Commit graph

47 commits

Author SHA1 Message Date
k4n4ry
f33c2ee357 feat: add StrictFieldMapping config 2025-12-30 20:53:31 +09:00
go-jet
1db6b12074 Add support for configuring the JSON unmarshal function used when querying SELECT_JSON statements. 2025-03-11 13:33:39 +01:00
go-jet
d86f14e665 Add support for strict scan.
If there are unused columns in query result set Query method panics.
2025-03-11 10:50:06 +01:00
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
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
7b16e432ff Add support for SELECT_JSON statements. 2025-02-21 19:55:01 +01: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
go-jet
d7a5adb239 Break utils package into subpackages. 2023-07-21 14:11:31 +02:00
go-jet
75fbc1baaf Bug225: Incorrect scan for duplicate aliased subtype slice. 2023-07-19 14:24:25 +02:00
go-jet
3e17c9219f Clean up. 2023-04-17 11:12:37 +02:00
go-jet
65e02fa87d Small optimizations. 2023-04-14 12:20:36 +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
Marco Ronchese
78ed3fdb13 adding test and cleaning up 2022-12-16 23:17:26 +01:00
Marco Ronchese
192826c456 allow custom types as indexes when joining tables 2022-12-16 13:09:46 +01: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
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
c10244aeab Improve Rows scan performance
ScanContext reused between rows.Scan calls.
Simplified assign value logic.
Use complex destination for Rows test.
2022-02-04 13:03:31 +01:00
go-jet
4955bfc4b5 Add automatic query logger function with additional execution details. 2022-01-12 19:03:50 +01:00
go-jet
02123005c1 [QRM] Prevent recursive scan if destination contains circular dependency. 2021-12-26 11:34:57 +01:00
go-jet
e8f4c2b31b Add SQLBuilder support for SQLite databases. 2021-10-21 13:40:26 +02:00
go-jet
6080ae134f QRM skip unnecessary new slice element copying. 2021-10-21 13:40:26 +02:00
go-jet
3f7efb33eb Build fix. 2021-10-16 10:46:28 +02:00
go-jet
0d418890ab Qrm refactor
- Allow custom types Scan method to read values returned by the driver rather then the value from intermediate Null types. Scan to intermidiate Null types removed.
- Better error handling
2021-10-15 17:43:10 +02:00
mlaflamm
8d43829bc5 Revert scanContext.rowElemValuePtr func signature 2021-09-15 19:30:28 +02:00
mlaflamm
fee77b695a Fix scan nil primitive type slice 2021-09-15 19:30:28 +02:00
go-jet
8864667f47 Add the ability to fully customize jet generated files. 2021-07-27 17:39:21 +02:00
go-jet
17e5e34111 Allow NUMERIC value scan into any number type 2021-05-21 16:09:29 +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
063b17ca05 Update lossless decimal tests to use new floats test table and DECIMAL literal constructor. 2021-05-09 16:37:16 +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
2ada2ff69b Add go mod support. 2020-06-27 18:48:19 +02:00
go-jet
5d742837f1 Use testify/require instead of testify/assert for tests. 2020-05-09 11:00:22 +02:00
go-jet
3efbb0ccd9 Replace gotest.tools with github.com/stretchr/testify. 2020-02-11 10:25:13 +01:00
go-jet
74725e8e11 Clean up. 2019-12-14 18:32:40 +01:00
go-jet
64a51dc093 QRM returns qrm.ErrNoRows when scanning into struct destination and query result set is empty. 2019-10-18 10:15:08 +02:00
go-jet
f8daa1d76e Some linter errors. 2019-10-18 10:09:56 +02:00
go-jet
53a76f31b4 Additional qrm tests. 2019-10-18 09:56:38 +02:00
Christian King
9a3f12ea5f Fix issue with using UUID primary keys in complex return types
When using a UUID as a primary key with PostgreSQL the grouping was
defaulting to the row which caused incorrect results to be returned.
2019-10-17 15:13:40 -04: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
3544977d7f QRM code refactor. 2019-10-11 10:15:36 +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
29f43e5fe8 Rename execution package to qrm (Query Result Mapping). 2019-09-27 11:46:31 +02:00