Skip to content

Conversation

@iwill
Copy link

@iwill iwill commented Nov 5, 2018

Improvements for executing query and update:

  1. sql supports parameter prefix ":" or "$" or "@" which supports by sqlite3;
  2. bind null if dictionaryArgs does not contain a key from pStmt;
  3. not to bind if pStmt does not contain a key of dictionaryArgs;

The 2 and 3 are useful when dictionaryArgs is a JSON object, which serialized from an Objective-C object. Some keys need not be stored into database, and some other keys are ignored since their values are nil.

With this commit, we donot need create another dictionary which must has the apropos key-values any more.

1. sql supports parameter prefix ":" or "$" or "@";
2. bind null if `dictionaryArgs` does not contain a key from `pStmt`;
3. not to bind if `pStmt` does not contain a key of `dictionaryArgs`;
@ccgus
Copy link
Owner

ccgus commented Nov 10, 2018

At first glance, this looks reasonable and tests pass. Let me look at it a bit more though before I make a commit.

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

Successfully merging this pull request may close these issues.

2 participants