Closed kilroy42 closed 3 years ago
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.
@kilroy42 no amount of find+replace can fix that I'm afraid. This might be dependent on the database I'm using (MySql support or Postgres might not care), but "transaction" is a reserved keyword, so quoted, unquoted, or backticks around it aren't the issue. Table names can't be reserved keywords like "transaction". Haven't tested it with fields, but I would just advise to use names that have some kind of prefix or suffix if you really want that reserved keyword nomenclature.
Just checked your code. You really should use prepared statements, that is one of the reasons it doesn't work. And will avoid a whole lot of other errors, too!
I fixed it in viewer/viewer.go
line 278:
var statement strings.Builder
statement.WriteString("select * from `")
statement.WriteString(schemaName)
statement.WriteString("`")
(Sadly I don't know go, so excuse my code style)
I have a database with a table called
transaction
. Opening it view the viewer:Probably only a missing quoting somewhere...
Schema is: