Skip to content
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

FTS4 "rebuild" command is failing #298

Open
seankim-android opened this issue Nov 4, 2021 · 0 comments
Open

FTS4 "rebuild" command is failing #298

seankim-android opened this issue Nov 4, 2021 · 0 comments
Labels

Comments

@seankim-android
Copy link

seankim-android commented Nov 4, 2021

Dialect

SQLite

Failing SQL

CREATE TABLE sample(
    id TEXT NOT NULL UNIQUE,
    name TEXT NOT NULL UNIQUE PRIMARY KEY,
    nameLocalized TEXT
);

CREATE VIRTUAL TABLE sample_fts USING fts4(
    content="sample",
    tokenize=unicode61 "remove_diacritics=0" "tokenchars=+",
    name TEXT NOT NULL UNIQUE PRIMARY KEY,
    nameLocalized TEXT
);

-- region Failing
rebuildFtsIndex:
INSERT INTO sample_fts(sample_fts) VALUES('rebuild');
-- endregion

Description

Hello. I have an FTS4 setup similar to this.

Adding INSERT INTO sample_fts(sample_fts) VALUES('rebuild'); fails the build.

I believe this is a valid SQL statement. Could someone please take a look? 🙏

source(7.2. The "rebuild" command): https://www.sqlite.org/fts3.html#*fts4rebuidcmd

Screen Shot 2021-11-04 at 4 11 30 PM

Stack trace:
/Users/sean.kim/Projects/slack-android-ng/services/persistence/persistence-org-db/src/main/sqldelight/slack/persistence/emoji/Sample.sq line 15:0 - Cannot populate default value for column name, it must be specified in insert statement.
15    INSERT INTO sample_fts(sample_fts) VALUES('rebuild')
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Execution failed for task ':services:persistence:persistence-org-db:generateReleaseOrgDatabaseInterface'.
> A failure occurred while executing com.squareup.sqldelight.gradle.SqlDelightTask$GenerateInterfaces
   > Generation failed; see the generator error output for details.

Screen Shot 2021-11-04 at 4 15 01 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant