Commit graph

52 commits

Author SHA1 Message Date
go-jet
73d7e4823c Update test. 2023-04-14 12:13:09 +02:00
go-jet
14bd3b6c3b Fix for bug226.
Add struct fieldName to groupKey to have a unique groupKey for each field object.
2023-04-13 10:46:46 +02:00
go-jet
c7962aba71 Add bug226 test. 2023-04-10 20:14:55 +02:00
go-jet
b520a61b6e Test clean up.
Upgrade dependencies.
2023-04-06 11:26:09 +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
Marco Ronchese
31cddca786 add additional test 2022-12-17 17:21:46 +01:00
Marco Ronchese
68dbbabb99 fixing test 2022-12-17 17:19:34 +01:00
Marco Ronchese
78ed3fdb13 adding test and cleaning up 2022-12-16 23:17:26 +01:00
go-jet
f93636eab0 Add missing sqlite conditional functions. 2022-08-17 13:03:03 +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
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
go-jet
c86903fd1d Additional scan performance improvements
Move typeStack to ScanContext, so it is shared between rows.Scan calls.
Use string.Builder for string concatenations.
Simplify value assign logic.
Move convert value to the last assign step (needs for type conversions are rare).
2022-02-09 12:34:10 +01:00
go-jet
4f29960378 Add custom function call test. 2022-01-20 17:23:40 +01:00
go-jet
a506a96d6a Add DISTINCT operator support 2022-01-10 16:43:17 +01:00
go-jet
6fe9c26d30 [Postgres] Add support for DISTINCT ON clause. 2022-01-06 18:11:26 +01:00
go-jet
038a32b032 Add WITH RECURSIVE statement support 2022-01-04 18:08:06 +01:00
go-jet
01305a138f Add automatic type cast for integer literals
In parameterized statements integer literals, like Int(num), are replaced with a placeholders. For some expressions,
postgres interpreter will not have enough information to deduce the type. If this is the case postgres returns an error.
Int8, Int16, Int32.... functions now will add automatic type cast over a placeholder, so type deduction is always possible.
2021-12-26 17:29:43 +01:00
go-jet
02123005c1 [QRM] Prevent recursive scan if destination contains circular dependency. 2021-12-26 11:34:57 +01:00
go-jet
c0710bed29 Update go doc. 2021-12-24 17:13:13 +01:00
go-jet
d197956271 Avoid unnecessary double wrapping of SELECT statement when used as single function parameter. 2021-10-21 13:40:26 +02:00
go-jet
555ec293fb Add ability to exclude columns from ColumnList 2021-10-04 11:49:13 +02:00
go-jet
0f773b26d6 Add LATERAL query support 2021-05-03 19:47:03 +02:00
go-jet
0cba1f6401 Lateral - initial commit. 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
2ada2ff69b Add go mod support. 2020-06-27 18:48:19 +02:00
go-jet
fb8607da29 Add support for WITH statements and Common Table Expressions. 2020-05-24 17:55:28 +02:00
go-jet
0d3ec872d6 Add support for automatic query logging. 2020-05-10 11:41:07 +02:00
go-jet
5d742837f1 Use testify/require instead of testify/assert for tests. 2020-05-09 11:00:22 +02:00
go-jet
926b88ed40 Add reserved words for MySQL. 2020-05-02 22:15:38 +02:00
go-jet
4c6caa403e Test sample for dynamic projection and dynamic condition. 2020-02-16 17:35:39 +01:00
go-jet
3efbb0ccd9 Replace gotest.tools with github.com/stretchr/testify. 2020-02-11 10:25:13 +01:00
go-jet
d2fbdb68e6 Add support for conditional constructed projection list. 2019-12-14 19:11:35 +01:00
go-jet
4a3579e7f9 Postgres interval with date/time expression arithmetic. 2019-12-01 18:34:44 +01:00
go-jet
f9efee77ff QRM returns sql.ErrNoRows when scanning into struct destination and query result set is empty. 2019-10-12 18:45:09 +02:00
go-jet
8c9ae77cd8 Add QRM error if result set is empty when scanning into struct destination. 2019-10-10 16:09:44 +02:00
go-jet
e09c78dec3 New MIN/MAX functions that accepts any expression type. 2019-09-30 14:42:04 +02:00
go-jet
b88519bfd4 [Feature] Add support for database views.
[Feature] Add support to manually set primary keys for destination structure fields.
2019-09-20 12:53:52 +02:00
go-jet
5ba10d35db Added support for window clause and functions. 2019-09-17 13:34:47 +02:00
go-jet
46a3dc7dfb MySQL linter errors. 2019-08-17 10:43:16 +02:00
go-jet
d5466a91e6 Move init and test results data to separate repo. 2019-08-16 12:43:41 +02:00
go-jet
0dbdbb9220 MariaDB tests fix. 2019-08-15 11:59:17 +02:00
go-jet
14c2c9d745 Expression wrappers test. 2019-08-13 10:33:31 +02:00
go-jet
614c7e9754 Literal and cast clean up. 2019-08-13 10:16:26 +02:00
go-jet
8519ccbdd0 Postgres refactor. 2019-08-11 09:52:02 +02:00
go-jet
4c5584aaae Update circle ci for MySQL tests. 2019-08-08 10:51:59 +02:00
go-jet
6ee2f45548 [New] Constructor for time types, that accepts time.Time. (TimeT, TimezT, DateT, ...) 2019-08-06 11:41:45 +02:00
go-jet
647ef21aaf Dialect refactor improvements and clean up. 2019-08-06 10:29:04 +02:00
go-jet
23fd973699 Package structure refactor. 2019-08-03 14:10:47 +02:00
go-jet
6af43f0c46 MySQL select statement tests. 2019-08-01 16:56:54 +02:00