35 Commits
Author SHA1 Message Date
zeekay 74627ec1a2 Fork huandu/go-sqlbuilder v1.39.1 to hanzoai/sqlbuilder; debrand ClickHouse flavor -> Datastore
- go.mod module path -> github.com/hanzoai/sqlbuilder (package name kept: sqlbuilder)
- Rename exported Flavor constant ClickHouse -> Datastore (same iota ordinal 6,
  behavior byte-identical): const decl, all case labels (Interpolate/Quote/
  PrepareInsertIgnore/args/select/union), Flavor.String() literal "ClickHouse"
  -> "Datastore", and the name<->flavor test map.
- Rename unexported dialect helper clickhouseInterpolate -> datastoreInterpolate.
- Rename example ExampleInsertBuilder_insertIgnore_clickhouse -> _datastore.
- Update tests + README flavor list to Datastore.
- Keep upstream MIT LICENSE; add NOTICE recording the fork + rename.

Dialect SQL output unchanged; only the identifier is renamed.
2026-07-12 18:00:41 -07:00
Huan Du 18f7db8816 fix #211: Support clone (deep copy) in all builders 2025-09-17 16:19:09 +08:00
Huan Du 8ed4b5374f fix #192 Add new flavor Doris 2025-03-20 19:05:19 +08:00
Huan Du d8cdbb7ceb fix #178: avoid stackoverflow when Cond is misused 2024-11-05 14:24:10 +08:00
Huan Du 8329700531 fix #169: support IS [NOT] DISTINCT FROM operator 2024-09-23 22:03:08 +08:00
Huan Du 96e64e9b7d feature: new builder WhereClause dedicated for WHERE 2024-04-13 23:32:24 +08:00
maixl 2d88cfe780 支持informix 2024-03-19 10:50:29 +08:00
tianfw 9cd8ddcc2c support oracle 2023-08-27 21:18:36 +08:00
Huan DuandGitHub 447c14160c Merge pull request #117 from huandu/feature-tuples
Fix #108: Support tuple
2023-07-22 23:13:48 +08:00
Huan Du 218c717c01 refs #108: support tuples 2023-07-22 22:51:03 +08:00
Huan Du 769091c858 refs #115: Generate SQL only when necessary values are set 2023-07-22 20:50:59 +08:00
Huan DuandGitHub cb38c02175 Merge pull request #102 from huandu/feature-more-cond
fix #100 Add EXISTS/NOT EXISTS/ANY/SOME/ALL in `Cond`
2023-04-01 16:57:49 +08:00
Huan Du eb96df9e68 refs #100 add EXISTS/NOT EXISTS/ANY/SOME/ALL in Cond 2023-04-01 16:43:22 +08:00
Huan Du 0b1c445a5c refs #98 add new flavor Presto 2023-03-27 23:17:33 +08:00
Huan Du 59650fe906 update readme and format code 2023-01-12 17:08:08 +08: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
csuzhang 561104398a support ClickHouse Grammar 2022-12-12 17:34:23 +08: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
Aleksander Zaruczewski 157445026c Fix warnings and typos 2022-02-17 16:07:23 +03:00
Huan Du 3e007c306f refs #64 add SQLServer flavor 2021-07-25 03:28:33 +08:00
Huan Du 51547d1782 fix #51: support new flavor SQLite 2020-12-26 23:51:35 +08:00
Huan Du 6a3f9222bd update doc and test cases 2019-04-25 18:47:11 +08:00
Huan Du 477f4420d9 new feature: interpolate args in sql 2019-04-24 17:10:23 +08:00
Huan Du 8969b5e31c refs #19. print normal $ sign in format string if $ syntax is wrong 2019-04-21 22:42:31 +08:00
Huan Du 88302d2a18 fix #6. fix incorrect marker when nesting builders with PostgreSQL flavor. 2018-02-04 22:48:08 +08:00
Huan Du e219582f5a fix #6. support Postgre-flavor markers. 2018-02-04 21:49:42 +08:00
Huan Du eef30ff185 add BuildNamed 2017-12-31 20:31:07 +08:00
Huan Du 3d80e20960 update doc and provide more samples 2017-12-31 00:31:19 +08:00
Huan Du 8751efc7f5 update doc and refactory args.go 2017-12-29 16:53:30 +08:00
Huan Du 69b77454a6 implement Build, List and Named to enable customization 2017-12-29 00:50:57 +08:00
Huan Du f07cafe24d avoid use map in Args#Compile to stabilize output 2017-12-28 19:34:54 +08:00
Huan Du 59e26deed3 provide Flatten; support sql.NamedArg 2017-12-28 18:26:21 +08:00
Huan Du 40f9bb99c7 support nested sql 2017-12-28 12:19:50 +08:00
Huan Du 8193c41814 add tests and doc 2017-12-28 01:33:30 +08:00
Huan Du 2f7b2c59bb init 2017-12-28 00:37:13 +08:00