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
TIMOB-9550: BlackBerry: Implement App elements needed for KitchenSink #112
Conversation
[Issues Fixed] TIMOB-9550: BlackBerry: Implement App elements needed for KitchenSink [Added] NativeSimpleDBInterface.cpp NativeSimpleDBInterface.h TiAppObject.cpp TiAppObject.h TiAppPropertiesObject.cpp TiAppPropertiesObject.h [Changes] NativeMessageStrings.h - added Create_table_failed TiMessageStrings.h - fixed order - added Invalid_argument_expected_, Type_does_not_match TiTitaniumObject.cpp - added TiAppObject [Tests] Test 1: Run the test app from Jira 1) Create a project and replace app.js with the one from the Jira 2) Build, package, and run the app 3) Verify the text matches the expected output and the persistent bool is false 4) Close and rerun the app and verify the persistent bool is true
db_.open(); | ||
Q_ASSERT(db_.isOpen()); | ||
QSqlQuery query(db_); | ||
query.exec("CREATE TABLE IF NOT EXISTS " + table_ + " (simpleKey CHAR(10) PRIMARY KEY, simpleValue TEXT)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't use VARCHAR here to not make key fixed length? Could there be cases when App have multiple values for key? What about unicode key/values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Can't have multiple values for a key. I'm not sure we support anything but UTF-8.
Reviewed. |
Also I've noticed that R6 lets you store and manage data in JSON format. So, since you're converting everything to json, isn't it reasonable to use that feature? |
[Added] NativeException.cpp NativeException.h [Changes] NativeMessageStrings.h - added error strings NativeSimpleDBInterface.cpp - throw exceptions - change simpleKey to VARCHAR(255) NativeSimpleDBInterface.cpp/h, TiAppPropertiesObject.cpp/h - use const string& TiAppPropertiesObject.cpp - fix formatting - convert NativeException to ThrowException
Updated. As discussed, the R6 JSON stuff is only to store single JSON objects |
Approved with minor comment |
explicated NativeException ctors
TIMOB-9550: BlackBerry: Implement App elements needed for KitchenSink
Reviewer: Alex
[Issues Fixed]
TIMOB-9550: BlackBerry: Implement App elements needed for KitchenSink
[Added]
NativeSimpleDBInterface.cpp
NativeSimpleDBInterface.h
TiAppObject.cpp
TiAppObject.h
TiAppPropertiesObject.cpp
TiAppPropertiesObject.h
[Changes]
NativeMessageStrings.h
TiMessageStrings.h
TiTitaniumObject.cpp
[Tests]
Test 1: Run the test app from Jira