Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing quoting when tables have "special" names #9

Open
kilroy42 opened this issue Sep 4, 2021 · 1 comment
Open

Missing quoting when tables have "special" names #9

kilroy42 opened this issue Sep 4, 2021 · 1 comment

Comments

@kilroy42
Copy link

@kilroy42 kilroy42 commented Sep 4, 2021

I have a database with a table called transaction. Opening it view the viewer:

panic: SQL logic error: near "transaction": syntax error (1)

goroutine 1 [running]:
sqlite3-viewer/viewer.(*TuiModel).SetModel(0x987d60, 0x0, 0xc0000142c6)
        termdbms/viewer/events.go:171 +0x765
main.main()
        termdbms/main.go:113 +0x4e5

Probably only a missing quoting somewhere...

Schema is:

CREATE TABLE `transaction` (
        id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
        sheetId INTEGER NOT NULL,
        transactionId INTEGER NOT NULL,
        lineno INTEGER NOT NULL,
        lineId INTEGER NOT NULL REFERENCES line(id)
);
@mathaou
Copy link
Owner

@mathaou mathaou commented Sep 4, 2021

This is a limitation of the SQL library I'm using, but I might be able to fix it with a simple find and replace. Will investigate and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants