Commit graph

662 commits

Author SHA1 Message Date
go-jet
f696dca42c
Merge pull request #86 from mlaflamm/export-group-by
Export GroupByClause type through alias
2021-07-30 10:48:34 +02:00
mlaflamm
c47d79ffd7 export GroupByClause type through alias 2021-07-29 09:51:55 -04:00
go-jet
0017773d27 Merge remote-tracking branch 'upstream/master' into develop 2021-07-27 17:53:04 +02:00
go-jet
8864667f47 Add the ability to fully customize jet generated files. 2021-07-27 17:39:21 +02:00
go-jet
f0bf2c36b3
Merge pull request #78 from go-jet/develop
Merge develop to master for 2.5.0 release
2021-05-21 17:20:27 +02:00
go-jet
caa81930dc Reset FROM clause list before new values are set. 2021-05-21 16:25:26 +02:00
go-jet
17e5e34111 Allow NUMERIC value scan into any number type 2021-05-21 16:09:29 +02:00
go-jet
cecdab1c67 Test fix. 2021-05-17 15:13:54 +02:00
go-jet
3e9eda28c1 Update README.md 2021-05-17 14:54:26 +02:00
go-jet
87373f1425 Test fix 2021-05-17 14:53:53 +02:00
go-jet
8a283bea25 Update jet generator version 2021-05-16 19:19:27 +02:00
go-jet
38541522e6 Fix linter errors 2021-05-16 19:10:43 +02:00
go-jet
3021a6a0fd Add support to retrieve Rows from statement
Rows statement method executes statements over db connection/transaction and returns Rows.
2021-05-16 18:46:50 +02:00
go-jet
a5b7769589 Add RawStatement support
RawStatement method creates new sql statements from raw query and optional map of named arguments.
2021-05-15 11:54:41 +02:00
go-jet
e95a2385ee Run postgres tests with pgx driver 2021-05-14 14:13:42 +02:00
go-jet
7af9072b8d Allow Raw helper to accept named arguments 2021-05-14 12:15:35 +02:00
go-jet
9385f462df Allow Bytea literal constructor to accept byte array.
Bytea literal constructor now accepts string or []byte a a parameter.
2021-05-12 12:29:22 +02:00
go-jet
f30cbb9e89 Add UUID helper function
UUID creates string literal expression from uuid object.
uuid can be any uuid type with a String method.
2021-05-11 13:20:07 +02:00
go-jet
256be8a406 [BUG] Update statement reserved word not escaped
Update statement, using MODEL struct, now generates escaped SQL identifier if column name is reserved word.
2021-05-09 17:17:14 +02:00
go-jet
063b17ca05 Update lossless decimal tests to use new floats test table and DECIMAL literal constructor. 2021-05-09 16:37:16 +02:00
go-jet
92d02fef78 Add DECIMAL constructor for Float literal.
DECIMAL constructor is used to pass a decimal number to the SQL query without precision loss.
2021-05-09 16:25:54 +02:00
David Racine
08cc316101 fix insert of decimal by changing decimal library 2021-05-03 20:14:13 +02:00
David Racine
1404bf5e16 fix mixup imports 2021-05-03 20:14:13 +02:00
David Racine
f1ac6561b9 fix mixup imports 2021-05-03 20:14:13 +02:00
David Racine
a5f5091903 keep support destination type float64 for decimal/numeric 2021-05-03 20:14:13 +02:00
go-jet
059515f52b QRM: Convert lossless decimal types first to string. 2021-05-03 20:14:13 +02:00
go-jet
5ab430c367 Merge remote-tracking branch 'remotes/origin/add-lateral' into develop
# Conflicts:
#	tests/mysql/select_test.go
#	tests/postgres/select_test.go
2021-05-03 20:00:34 +02:00
go-jet
0f773b26d6 Add LATERAL query support 2021-05-03 19:47:03 +02:00
go-jet
4ef0113f6b Add implicit cross join support 2021-05-03 18:48:15 +02:00
go-jet
0cba1f6401 Lateral - initial commit. 2021-04-30 14:02:49 +02:00
go-jet
1146afe343 Update circle-ci
Add new test database.
2021-04-30 14:02:49 +02:00
go-jet
616f27306e Update quick-start example with updated auto generated files 2021-04-30 14:02:49 +02:00
go-jet
fae8dde639 Add schema rename support
Using SchemaFrom("schemaName") it is possible to set SQL builder table to point to a different schema.
2021-04-30 14:02:49 +02:00
go-jet
38776e35ab Remove methods from Table interface that affects receiver object
Modifying SQL builder receiver object can produce unwanted side effects.
2021-04-30 14:02:49 +02:00
Joonas Haapsaari
1e511654fd Schema rename support
- Support for renaming table schemas
 * Table support for renaming schema
 * Empty schema name is left out (using default schema for the
   database connection)
 * Generated code support for obtaining a version of the table with
   renamed schema, similarly as the `AS` function works
 * Unit tests for setting and clearing the schema name
2021-04-30 14:02:49 +02:00
go-jet
9773657c3d Merge remote-tracking branch 'remotes/origin/schema-rename-support2' into develop 2021-03-21 17:27:44 +01:00
go-jet
f8cfaaace1 Update circle-ci
Add new test database.
2021-03-21 17:23:42 +01:00
go-jet
d63e56f574 Update quick-start example with updated auto generated files 2021-03-21 17:19:54 +01:00
go-jet
b375733dfa Add schema rename support
Using SchemaFrom("schemaName") it is possible to set SQL builder table to point to a different schema.
2021-03-21 17:19:54 +01:00
go-jet
753d3bac9a Remove methods from Table interface that affects receiver object
Modifying SQL builder receiver object can produce unwanted side effects.
2021-03-21 17:19:54 +01:00
DevDevious
5b4a1ebd63 Added unsigned integer literals. 2021-03-21 17:19:54 +01:00
go-jet
2fb93a0bdb Update circle-ci config 2021-03-21 17:19:54 +01:00
go-jet
7bafa1ffef
Merge pull request #73 from DevDevious/unsigned-integers
Unsigned integer literal support
2021-02-23 14:09:47 +01:00
DevDevious
6b06bc6a37 Added unsigned integer literals. 2021-02-22 13:58:28 -05:00
go-jet
92818acd50 Update circle-ci config 2021-02-21 17:12:17 +01:00
go-jet
4c821d16b0
Merge pull request #47 from joonash/schema-rename-support
Schema rename support
2020-11-17 19:31:24 +01:00
go-jet
667d534a65
Merge pull request #55 from campsite/develop
Add support for custom functions.
2020-10-02 19:24:43 +02:00
tolfino
bc104d7dbb Add support for custom functions.
This allows expressions like jet.Func("FOO", String("test")) to be
emitted as FOO($1).
2020-10-02 08:53:26 -07:00
go-jet
29119d71d9
Merge pull request #51 from gkdr/export-order-by
Export OrderByClause type through alias.
2020-09-06 16:22:55 +02:00
Richard
1c435f5c7f export OrderByClause type through alias
enables e.g. creating a collection of clauses beforehand and dynamically adding to it.
this resolves #48.
2020-09-03 13:25:23 +02:00