Commit Graph

16 Commits

Author SHA1 Message Date
Neil O'Toole
2ba633fc2a
: Alias can be an arbitrary string. ()
* Fixed space issues with expressions

* Alias can now be an arbitrary string

* Alias can now be an arbitrary string (fixed)

* Alias now automatically applied to expressions

* Ignore .run

* Fixed issue with TestRun not logging correctly to testing.T

* Fiddling with sqlite3 temp file closing

* Re-enable tests
2023-06-18 00:05:09 -06:00
Neil O'Toole
e93f462fff
: explicit where() clause ()
Implement explicit `where()` clause.
2023-06-16 22:54:25 -06:00
Neil O'Toole
24b5fafd78
Proprietary functions now require leading underscore () 2023-05-26 21:11:38 -06:00
Neil O'Toole
958d509088
Source groups ()
* Implemented source groups mechanism.
2023-04-15 16:28:51 -06:00
Neil O'Toole
9a1c6a7d09
Feature/173 args ()
- Implement --arg feature
- Refactor sqlbuilder package (now called "render").
- Bug fixes, especially around expressions.
2023-04-07 02:00:49 -06:00
Neil O'Toole
8d47ef806d
go1.20 upgrade; lots of linting () 2023-04-01 02:38:32 -06:00
Neil O'Toole
29e33ed2b1
Implement unique / DISTINCT ()
- Implemented "unique" function
- Implemented "count_unique" function
2023-03-28 00:48:24 -06:00
Neil O'Toole
fac3a27d7b
group_by() function ()
- `group_by()` now accepts function as argument.
- Refactored grammar.
- Broad improvements to function implementation.
2023-03-26 20:03:40 -06:00
Neil O'Toole
d9b56eea8a
Implement groupby() ()
* test: slq2sql more test cases; now executes the generated query

* groupby: first test case working against all DBs

* sakila: added sqlserver 2019 source

* groupby: tests for groupby synonyms

* groupby: final touches
2023-03-26 02:01:41 -06:00
Neil O'Toole
9746f4c1a2
orderby() ()
* wip: orderby impl

* Tests passing (note: ast.checkASTIntegrity is disabled)

* ExprNode now rendered via renderSelectorNode

* linting

* CHAGELOG for v0.27.0
2023-03-25 19:20:53 -06:00
Neil O'Toole
a1a89ee9dd
Support table and column names with spaces. ()
* sakila: initial test data

* sakila: more test data

* sakila: yet more test data setup

* whitespace cols: now working for sqlite

* grammar cleanup

* whitespace cols: now working inside count() func for sqlite

* whitespace cols: tests mostly passing; begining refactoring

* grammar: refactor handle

* grammar: more refactoring

* grammar: rename selElement to selector

* wip

* all tests passing

* all tests passing

* linting

* driver: implement CurrentSchema for all driver.SQLDriver impls

* driver: tests for AlterTableRename and AlterTableRenameColumn

* undo reformat of SQL

* undo reformat of SQL

* undo reformat of SQL

* undo reformat of SQL
2023-03-22 00:17:34 -06:00
Neil O'Toole
d3e6f89829
SLQ support for column aliases ()
* alias: more early work

* alias: test cases working for sqlite

* alias: SQL builder tests

* alias: func (col expr) aliases now working for SQLite

* linting

* CHANGELOG update

* Docs update

* Docs update

* Rename buildAst() -> buildAST()

* CHANGELOG typo
2023-03-18 22:58:00 -06:00
Neil O'Toole
62f067f633
Chore/upgrade to antlr 4.12.0 ()
* Antlr update

* README update

* parser: regenerated with antlr 4.12.0
2023-03-15 20:53:40 -06:00
Neil O'Toole
0a627a7b6f
Chore/antlr 4.11.1 upgrade ()
* baseline seems to be working

* Updated to antlr4

* few more module upgrades
2022-12-23 21:43:20 -07:00
Neil O'Toole
e674cdc724
change 'interface{}' to 'any' () 2022-12-16 16:34:33 -07:00
Neil O'Toole
e4cc68b714
Slq move ()
* moved it

* what used to be libsq/slq in now libsq/ast/internal/slq
2020-08-23 05:16:16 -06:00