Commit graph

170 commits

Author SHA1 Message Date
go-jet
97f1b46352 Revert go version change and mariadb. 2025-03-09 18:22:31 +01:00
go-jet
950b33191e Remove QueryJson statements method to avoid potential misuse. 2025-03-09 17:46:34 +01:00
go-jet
12c96116d0 Remove 3rdparty/json. 2025-03-08 19:09:58 +01:00
go-jet
17646ca99c Encode json values implicitly in the sql queries according the golang json package spec. 2025-03-08 19:01:37 +01:00
go-jet
27e6cc1604 Tests fix. 2025-03-01 18:23:27 +01:00
go-jet
c94216ab0e Add support for blob expressions. 2025-02-28 18:23:15 +01:00
go-jet
f20bf50879 Support additional unmarshal formats.
- Additional time formats supported
- Support for hex format binary string unmarshal
- Support for base64 format with prefix
- Support for unmarshalling "0" and "1" to boolean value
2025-02-22 18:28:25 +01:00
go-jet
c93c9f2888 Add encoding/json from standard library 2025-02-21 19:58:26 +01:00
go-jet
7b16e432ff Add support for SELECT_JSON statements. 2025-02-21 19:55:01 +01:00
go-jet
5f220569dd Add support for prepared statements caching. 2024-10-29 11:44:38 +01:00
go-jet
4bb9775134 Merge remote-tracking branch 'upstream/master' into stmt-cache2
# Conflicts:
#	tests/postgres/alltypes_test.go
#	tests/postgres/northwind_test.go
#	tests/postgres/sample_test.go
#	tests/postgres/update_test.go
#	tests/sqlite/insert_test.go
#	tests/sqlite/main_test.go
#	tests/sqlite/sample_test.go
#	tests/sqlite/update_test.go
2024-10-19 14:01:55 +02:00
go-jet
8d112f7db8 Add support for VALUES statement. 2024-10-17 14:17:22 +02:00
go-jet
3fcbbec427 Add support for Row expression. 2024-10-17 14:17:22 +02:00
Samir Faci
f7082eda68 Adding gosec and lint, fixing null_type overflow
ChangeLog:
  - Adding gosec linting
  - Adding static type to enum
  - fixing nulltype overflow
  - Trying out gotestsum as an alternative to go-junit-report.xml
2024-10-14 11:06:59 -04:00
Samir Faci
288ebdc373 Improved support for intervals in postgres
Fixes #393
2024-10-08 08:30:33 -04:00
Samir Faci
c2703558d7 Moving PtrOf to package internal/ptr 2024-10-06 09:04:10 -04:00
Samir Faci
99be328e9d Replacing several test util function with a generic version
ChangeLog:
  - updated several test utils with a generic PtrOf
  - updated references using iotils (Deprecated) with os equivalent import.
2024-10-05 13:13:55 -04:00
go-jet
adfa331ece Merge remote-tracking branch 'upstream/master' into stmt-cache 2024-07-30 14:11:24 +02:00
Yosyp Buchma
583ecba4a1 refactor: extracted common logic for column aliasing 2024-07-26 23:35:07 +02:00
Yosyp Buchma
c599fca5ea New method: func (ColumnList) As(tableAlias string) ProjectionList 2024-07-26 14:10:20 +02:00
Yosyp Buchma
fb66fbd31c fix ProjectionList{}.As method (issue #364) 2024-07-26 14:10:20 +02:00
Mathieu Kooiman
3ec0e2cabd refactor: NewCustomExpression -> CustomExpression 2024-07-13 17:04:33 +02:00
Mathieu Kooiman
f48970d124 refactor: expose NewCustomExpression for dialects to use 2024-07-12 14:09:17 +02:00
Karl Blomster
1d310624d8
Export BinaryOperator function 2024-03-26 15:49:17 +01:00
go-jet
0918e5503e Add support for prepared statement caching. 2024-03-07 18:01:31 +01:00
go-jet
43fc77ba99 Range expression update
* Add Int4 and Int8 integer expression to distinguish int4range and int8range types
* Add range functions to range expressions to avoid go template appearing in sql
* Compact range integration tests and add range update tests
2024-02-27 10:48:57 +01:00
Sarkan
893567daca
Range types implemented
plus and minus infinity keyword tests implemented

range table tests added

skip cockroach db added

select test case added for range fields

generator modified to generate correct types

generator tests modified to include sample range table

model and template generators modified to support range fields

returning the T in UPPER and LOWER functions

raw ranges implemented

bounds set as optional

dep modified

dependencies modified and issue fixed

range expression with templates implemented

rangeExpression change to make it more type safe

third parameter of constructor function fixed

literals removed, functions added

tests modified

constructor functions used for creating range expressions

NumRange converted to a constructor function from literal

range_lower and range_upper renamed to lower_bound and upper_bound

range literal removed

PlusInfinity and MinusInfinity implemented

int4 and int8 castings added

issues fixed and tests checked

number, ts, tstz literal and cast implemented

date range literal expression modified and raw function used

parent type converted from RangeExpression to Expression

range type implemented for postgres

range column type, function and literal expression implemented

CONTAINS and OVERLAP operations added for range expressions

range expressions implemented
2024-02-25 01:20:36 +01:00
go-jet
6b098b8e41 Replace invalid character from the go identifiers with description string. 2024-02-17 12:46:00 +01:00
go-jet
255f4a8eaf Add support for expression in OFFSET clause. 2024-02-13 14:01:13 +01:00
go-jet
dab153a739 Add support for NULLS_FIRST and NULLS_LAST sorting order. 2024-02-10 14:03:31 +01:00
go-jet
e51ddd5506 Add support for FETCH FIRST clause. 2024-02-07 11:07:50 +01:00
go-jet
71fb1c7cd1 Add support for sqlite generated columns. 2024-02-04 18:35:26 +01:00
Matthew Dowdell
f16f0b5e5d Add support for OF in row lock clauses
This adds support for statements such as `SELECT ... FOR UPDATE OF table NOWAIT` where `OF table`
could not be specified previously. Fixes #285.
2023-11-30 07:52:54 +00:00
go-jet
12509eaf44 Additional generator tests. 2023-07-21 17:10:39 +02:00
go-jet
d7a5adb239 Break utils package into subpackages. 2023-07-21 14:11:31 +02:00
go-jet
06ecd73f67 Improve generator error handling 2023-07-21 13:20:44 +02:00
go-jet
0a7e0b5392 Expose internal RawBool type 2023-04-17 12:46:11 +02:00
go-jet
a428981a2d Expose internal jet.Rows type 2023-04-17 12:01:01 +02:00
go-jet
5e34bef288 Add more UseSchema tests.
Rename newly generated file to avoid potentional conflict with tables named table or views named view.
2023-04-02 13:58:44 +02:00
go-jet
fa69565dbf Add support for postgres GROUPING SET, ROLLUP and CUBE grouping operators
Add support for mysql WITH ROLLUP grouping operator
Add support for GROUPING operator
2023-03-28 13:16:57 +02:00
go-jet
f772f90336 [MySQL] Optimizer hints 2022-09-29 13:33:00 +02:00
go-jet
a2ea1892e5 Go fmt. 2022-08-23 12:38:16 +02:00
go-jet
4e1ff65023 [MySQL] Add NEW alias for the rows to be inserted. 2022-08-23 12:23:46 +02:00
Nikita Konin
92254c35df add missing SET method to ColumnTimez interface
it has been already implemented, just missing from interface
2022-08-18 13:23:51 +03:00
go-jet
6706f4b228 [Bug] DebugSQL panics with libraries that do not implemente Stringer interface. 2022-05-14 11:17:39 +02:00
go-jet
3b0285cc4b [Bug] Statement Query and Exec methods can not be used with sql.Conn 2022-05-13 14:04:11 +02:00
go-jet
84dbda5948 Improve doc. 2022-05-13 13:46:41 +02:00
go-jet
2101088d0e Add support for EXTRACT time/date function. 2022-05-06 11:54:44 +02:00
go-jet
bc776f947b Add support for CockorachDB. 2022-05-05 13:01:42 +02:00
go-jet
9f91fd705a Global AND and OR functions for better indentation of a complex condition in the Go code and in the generated SQL. 2022-02-11 13:09:49 +01:00