You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to execute select query to read data from sqlite tables. but while reading data all the column names are coming in lower case in ios but its coming pascal case in android.
createtablequery = 'CREATE TABLE IF NOT EXISTS TestTable (ID varchar(255) NOT NULL PRIMARY KEY, FirstName varchar(255), LastName varchar(255),Address varchar(255),MobileNumber varchar(255));'
query = select * from TestTable ;
this.sqlite.query(query, values);
@NeeteshSonkiya First thanks for using the plugin, Sqlite3 Swift doesn't make the differences between lastname, LastName, lastName so even if the column is created with LastName if you look at the database with an external tool like DBBrowser you can see LastName when you query like SELECT LastName from TestTable
or SELECT lastname from testtable
or SELECT lastName from testTable
it is always returning the same .
To the contrary SQLite Java is case sensitive.
To get the same results from both Swift and Java the Swift query will have to parse all the resulting row and modify the column name when required meaning slowing down the whole process even for those who never use Capitalization letter.
So my answer will be to use a standard rules for naming which works for all the devices you want your application to work with meaning No Capitalisation letters
Hope this clarify, tell me if my answer suit you
I am trying to execute select query to read data from sqlite tables. but while reading data all the column names are coming in lower case in ios but its coming pascal case in android.
createtablequery = 'CREATE TABLE IF NOT EXISTS TestTable (ID varchar(255) NOT NULL PRIMARY KEY, FirstName varchar(255), LastName varchar(255),Address varchar(255),MobileNumber varchar(255));'
query = select * from TestTable ;
this.sqlite.query(query, values);
query result- (ios)
id, firstname, lastname, address, mobilenumber
query result- (android)
ID, FirstName, LastName, Address, MobileNumber
Please help me out to get same column name from sqlite table.
Thanks in advance
The text was updated successfully, but these errors were encountered: