Commit graph

137 commits

Author SHA1 Message Date
814ebddfa2
Add support for PostGIS Geometry columns
This is primarily an experiment. At this point I'm getting back the
Geometry as a GeoJSON blob, which is pretty massive progress, but I'm
still not able to manipulate the data directly the way I'd like.
2026-05-06 20:36:10 +00:00
go-jet
27c67aee3d Fix false positive security scan issues. 2026-02-16 13:04:00 +01:00
go-jet
0e495a279e Simplify literal expressions. 2026-02-02 13:21:35 +01:00
go-jet
4995a90483 Simplify construction of new expressions.
Fixes: IS_NOT_NULL() does not always add enough parentheses to the compiled SQL #500
2026-02-02 13:18:19 +01:00
go-jet
89e93710aa Additional tests. 2025-10-17 13:41:08 +02:00
go-jet
4ee047a675 Add support for additional array types. 2025-10-16 15:09:07 +02:00
go-jet
45d4ced9b0 Merge branch 'arjen-ag5/master' into pg_arrays
# Conflicts:
#	generator/template/model_template.go
#	generator/template/sql_builder_template.go
#	internal/jet/expression.go
#	postgres/cast.go
#	postgres/columns.go
#	postgres/expressions.go
#	postgres/insert_statement_test.go
#	postgres/literal.go
#	tests/postgres/alltypes_test.go
#	tests/postgres/generator_template_test.go
#	tests/postgres/scan_test.go
#	tests/postgres/select_test.go
2025-10-16 13:44:18 +02:00
Arjen Brouwer
d3ada5361e Add support for postgres arrays 2025-10-16 13:32:18 +02:00
go-jet
cfc264221b Rename the parent pointer to root, as the pointer often references expression multiple layers above the current expression. 2025-03-09 19:06:17 +01:00
go-jet
03af2665ea Merge branch 'master' into select_json
# Conflicts:
#	tests/postgres/alltypes_test.go
2025-03-09 18:32:20 +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
33c1d9e663 Reintroduce Uint64 literal constructor for postgres dialect. 2025-03-04 19:57:42 +01:00
go-jet
c94216ab0e Add support for blob expressions. 2025-02-28 18:23:15 +01:00
go-jet
7b16e432ff Add support for SELECT_JSON statements. 2025-02-21 19:55:01 +01:00
formica2
906836f167 Add omitted reserved word on postgresql 2025-01-13 11:12:44 +03:00
formica2
855824a793 Add postgres keyword authorization 2024-12-23 13:22:29 +03:00
go-jet
5d2c232529 Add custom set returning function test. 2024-11-03 12:00:39 +01:00
go-jet
cf0923fdd3 Rollback some of the deleted postgres unsigned integer constructors. 2024-11-03 11:58:39 +01:00
go-jet
2183af42f4 Add PostgreSQL-specific character type constructors: Text, Char, and VarChar. 2024-11-01 12:34:46 +01:00
go-jet
4f0832b0e7 Remove unused cast interface. 2024-11-01 12:30:37 +01:00
go-jet
49104d1969
Merge pull request #416 from go-jet/stmt-cache2
Add support for prepared statement caching
2024-10-29 11:50:53 +01:00
go-jet
5f220569dd Add support for prepared statements caching. 2024-10-29 11:44:38 +01:00
go-jet
bee431f870
Merge pull request #397 from BranislavLazic/add-pg-generate-series
Add Postgres GENERATE_SERIES function
2024-10-28 12:00:37 +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
288ebdc373 Improved support for intervals in postgres
Fixes #393
2024-10-08 08:30:33 -04:00
Branislav Lazic
dfafd1482b Add Postgres generate_series function 2024-09-29 14:55:05 +02:00
Branislav Lazic
dce5fd6552 Add return type switching note 2024-09-23 09:11:53 +02:00
Branislav Lazic
b25b2aa213 Add Postgres DATE_TRUNC function 2024-09-20 09:47:40 +02:00
go-jet
adfa331ece Merge remote-tracking branch 'upstream/master' into stmt-cache 2024-07-30 14:11:24 +02:00
Mathieu Kooiman
6cabfcdc1a feat: expose CustomExpression+Token in mysql/postgres/sqlite 2024-07-13 17:10:26 +02:00
Karl Blomster
1d310624d8
Export BinaryOperator function 2024-03-26 15:49:17 +01:00
go-jet
39de87671e Additional tests for 'ON CONFLICT DO NOTHING without conflict target does not appear in generated SQL' bug. 2024-03-24 13:02:23 +01:00
bill matlock
0d250f5b41 ON CONFLICT DO NOTHING without a conflict target is valid SQL as far as Postgres is concerned. 2024-03-18 16:38:28 -04: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
255f4a8eaf Add support for expression in OFFSET clause. 2024-02-13 14:01:13 +01:00
go-jet
e51ddd5506 Add support for FETCH FIRST clause. 2024-02-07 11:07:50 +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
d7a5adb239 Break utils package into subpackages. 2023-07-21 14:11:31 +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
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
c9967d151e
Merge pull request #175 from Hoonyyhoon/fix/add_omitted
fix: Add omitted reserved word 'RIGHT' on postgresql
2022-09-07 10:43:41 +02:00
Stefan
16c9ee428e Add omitted reserved word 'right' on postgresql 2022-09-07 00:54:40 +09:00
go-jet
a2ea1892e5 Go fmt. 2022-08-23 12:38:16 +02:00
Vladimír Zahradník
11b0a6858a Better json func, and tests 2022-06-04 14:22:33 +02:00