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

unable to update columns with reserved name like delete or default #203

Open
behnejad opened this issue Oct 10, 2020 · 1 comment
Open

Comments

@behnejad
Copy link

there is an issue with making sql query for update.
if we use reserved words as column name or table name of out dabase we cannot update any of its fields from web interface because the query does not put names between `` signs.

here is an example

 android.database.sqlite.SQLiteException: near "delete": syntax error (code 1 SQLITE_ERROR): , while compiling: UPDATE [Card] SET delete=?,default=? WHERE id=?
android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:986)
android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:593)
android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590)
android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:61)
android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:33)
android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1702)
android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1650)
com.amitshekhar.debug.sqlite.DebugSQLiteDB.update(DebugSQLiteDB.java:50)
com.amitshekhar.utils.DatabaseHelper.updateRow(DatabaseHelper.java:331)
com.amitshekhar.server.RequestHandler.updateTableDataAndGetResponse(RequestHandler.java:347)
com.amitshekhar.server.RequestHandler.handle(RequestHandler.java:119)
com.amitshekhar.server.ClientServer.run(ClientServer.java:77)
java.lang.Thread.run(Thread.java:919)
@behnejad
Copy link
Author

and it would be better that webserver does not start when application starts. let developer decide when web server starts.

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

No branches or pull requests

1 participant