capacitor-community / capacitor-community/sqlite

feat: add support for negative primary keys

Open
#689 0 comments 0 reactions 0 assignees View on GitHub
feature needs: triage
Dominant language
Swift
Stars
661
Forks
158
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe:**

Sometimes i need to insert record with negative primary ID, but plugin says "Run: RunSQL: lastId < 0", SQLite itself has no problem with this. Its frustrating because I cant use primary key and need to control data manualy.

**Describe the solution you'd like:**

Will be nice to have possibility to insert negative primary ID

**Describe alternatives you've considered:**

For now I'm creating table without primary ID and checkign data manualy, to not have duplicate entries

**Additional context:**

```SQL
CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, user_name TEXT);
INSERT INTO `users` (`id`,`user_name`) VALUES(-1, "Admin")
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.