Commit Graph
18 Commits
Author SHA1 Message Date
Huan Du 3706314572 fix #134: Add new Num* methods in CRUD builders to count number of required clause 2023-11-30 23:57:25 +08:00
cemre.mengu 292410e6b4 add subselect builder for insert 2023-11-18 12:36:05 +03:00
Huan Du e0fd349ac7 update doc and tests for oracle flavor 2023-11-04 14:33:25 +08:00
zhangyd 92b7453ec1 oracle supports insert multiple values 2023-09-12 15:09:05 +08:00
Spencer Connaughton 86810be49d Fix insert test. 2023-01-09 16:34:03 -05:00
Spencer Connaughton 8880301f5b Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	README.md
#	args.go
#	flavor.go
#	insert_test.go
#	interpolate.go
#	interpolate_test.go
#	select_test.go
#	struct.go
#	struct_test.go
2023-01-05 10:19:05 -05:00
Huan Du bd37a413aa fix incorrect verb for InsertBuilder 2022-12-15 16:01:21 +08:00
39a4b2509b Merge remote-tracking branch 'upstream/master' (#2)
* ignore unexported fields that are not embedded structs

* fix #74 [BREAKING CHANGE] Select#GroupBy and Select#OrderBy behavior change.

Previous, GroupBy and OrderBy only keep the columns in the last call. Now, all columns are kept.

* fix #75 add Struct#Columns/ColumnsForTag and Struct#Values/ValuesForTag

* remove a call to StructField.IsExported as it is not in go1.13

* refs #78 add new `fieldas` tag to set AS name for SELECT

* update docs

* fix #81 refactory struct field parser to make fieldas correct in all cases

* Add Gitter badge

* Fix insert ignore for postgres and sqlite.

* fix test

Co-authored-by: MichaƂ Dobaczewski <[email protected]>
Co-authored-by: Huan Du <[email protected]>
Co-authored-by: The Gitter Badger <[email protected]>
Co-authored-by: Zhong Ren <[email protected]>
2022-11-30 10:57:35 -05:00
Zhong Ren 50850de843 fix test 2022-09-14 11:11:58 -04:00
Zhong Ren 45d8c3506f Fix insert ignore for postgres and sqlite. 2022-09-14 11:01:02 -04:00
Spencer ConnaughtonandGitHub 0f54cd520c Add CQL support (#1)
* Add CQL flavor.

* Add support for CQL argument compilation.

* Adopt substests for interpolation tests.

* Add support for CQL interpolation.

* Add support for CQL blobs.

https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/blob_r.html

* Add CQL timestamp interpolation support.

https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/timestamp_type_r.html

* Add builder test for CQL.

* Add support for the NOW function.

https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/timeuuid_functions_r.html?hl=now

* Add support for CQL update IF statement.

https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlUpdate.html#Conditionallyupdatingcolumns

* Drop table prefixes for CQL SELECTs.

* Switch to single quoting for CQL queries.

https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/escape_char_r.html

* Update documentation.

* Use valid CQL in tests.

* Support CQL LIMIT.
2022-09-08 14:39:35 -04:00
Huan Du b15ca56b4d refs #48 #49 #53: add new method SQL in all builders
All builders add a new method called SQL to enable us to add any
arbitrary SQL when building. It's quite useful when we are using some
kinds of extension syntax or add special comments in SQL.
2021-02-04 00:07:55 +08:00
David DouglasandGitHub e323bb9e5a Renamed example to correct name format 2019-09-05 21:16:56 -04:00
David Douglas ac0802ad49 Adding Insert Ignore to Insert Builder 2019-09-06 01:02:13 +00:00
Huan Du 4e1e3c3b1e refs #18. add new method ReplaceInto in InsertBuilder 2019-04-21 23:24:17 +08:00
Huan Du 69b77454a6 implement Build, List and Named to enable customization 2017-12-29 00:50:57 +08:00
Huan Du e121c6d3dd more tests 2017-12-28 01:56:44 +08:00
Huan Du 8193c41814 add tests and doc 2017-12-28 01:33:30 +08:00