+
Skip to content

Fix for issue #258 - insertOrUpdate for SQLite #370

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

Merged
merged 13 commits into from
May 30, 2022
Merged

Fix for issue #258 - insertOrUpdate for SQLite #370

merged 13 commits into from
May 30, 2022

Conversation

bin-tenkuu
Copy link
Contributor

@bin-tenkuu bin-tenkuu commented Feb 9, 2022

resolve #258

Since 3.24 SQLite supports upsert like postgres does. Consider adding it to SQLite dialect?

  • SQLite 方言: 添加 'insertOrUpdate' 支持 (InsertOrUpdate.kt)
  • SQLite 方言: 添加 SQLite 特有的部分方法: (Functions.kt)
    • jsonExtract, jsonPatch, jsonValid, random, ifNull, iif, instr, replace, toLowerCase, toUpperCase
  • SQLite 方言: 添加 'bulkInsert' & 'bulkInsertOrUpdate' 支持 (BlukInsert.kt)
  • SQLite 方言: 添加 冲突更新时 'where' 支持 (InsertOrUpdate.kt) & (BlukInsert.kt)
  • SQLite 方言: 添加 'insertOrUpdate' & 'bulkInsert' & 'bulkInsertOrUpdate' 全局方法 (Global.kt)
  • SQLite 方言: 添加 'insertOrUpdate' & 'bulkInsert' & 'bulkInsertOrUpdate' 的测试用例 (SQLiteTest.kt)

@bin-tenkuu
Copy link
Contributor Author

bin-tenkuu commented Feb 14, 2022

  • SQLite: Added insertOrUpdate & bulkInsert & bulkInsertOrUpdate, translated to its insert ... on conflict syntax.
  • SQLite: Added onConflict(key) { ... } for insertOrUpdate & bulkInsert & bulkInsertOrUpdate, translated to its on conflict (key) do ... syntax.
  • SQLite: Added where { ... } in function onConflict for insertOrUpdate & bulkInsert & bulkInsertOrUpdate, translated to its on conflict (key) do update set ... where ... syntax.

@bin-tenkuu
Copy link
Contributor Author

fix #329

Copy link
Contributor Author

@bin-tenkuu bin-tenkuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review by myself

@vincentlauvlwj vincentlauvlwj changed the base branch from master to v3.5.x May 30, 2022 16:30
@vincentlauvlwj vincentlauvlwj merged commit bf79efd into kotlin-orm:v3.5.x May 30, 2022
@vincentlauvlwj
Copy link
Member

Merged, will release in next version.

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.

insertOrUpdate SQLite
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载