sql icon indicating copy to clipboard operation
sql copied to clipboard

Pure Go SQL parser

Results 6 sql issues
Sort by recently updated
recently updated
newest added

https://go.dev/play/p/2yGiVAG8PtP ```go func TestCreateTableStringPanic(t *testing.T) { p := sql.NewParser(strings.NewReader(`CREATE TABLE Foo ( SomeID INTEGER NOT NULL PRIMARY KEY, Created INTEGER NOT NULL DEFAULT 0, ExplicitExpiry INTEGER, EffectiveExpiry GENERATED ALWAYS AS...

sqlite lets you create a table `main.Foo` https://www.sqlite.org/lang_attach.html says: > The schema-names 'main' and 'temp' refer to the main database and the database used for temporary tables. The main and...

The following update statement produces an error, although legal in sqlite3: ``` update_test.go:33: failed: 8:8: expected semicolon or EOF, found ndx ``` code ``` func TestUpdate(t *testing.T) { s :=...

Hi, I think this is a bug, but I'm not terribly familiar with this library and sql derivative. This sql query: ```sql SELECT count(), 'user without role', id FROM user...

Model it, perhaps, on astutils. References: - https://eli.thegreenplace.net/2021/rewriting-go-source-code-with-ast-tooling/ - https://pkg.go.dev/golang.org/x/tools/go/ast/astutil

It appears that the parser cannot understand selecting from a function. For example, this valid SQLite query cannot be parsed ```sql SELECT * FROM generate_series(1, 3) AS "x" ```