如何修复'SqliteCompoundSelectStmtImpl(COMPOUND_SELECT_STMT):[]:'?

时间:2019-07-23 08:17:56

标签: gradle kotlin-multiplatform sqldelight

我尝试在Kotlin-Multiplatform项目中设置SQLDelight。目前,我只针对jvm。

在通用代码上运行gradle任务'generateJvmMainMyDatabaseInterface'时,失败并显示:

> Failed to compile SqliteCompoundSelectStmtImpl(COMPOUND_SELECT_STMT): [] :
  SELECT * FROM test

当我删除selectNames: SELECT * FROM test;下面代码的最后一部分时,它实际上可以工作。因此,像INSERTDELETE这样的每条语句都可以,但SELECT则不行。

CREATE TABLE test (
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL
    );


insertItem:
INSERT INTO test(name) VALUES (?);

addexample:
INSERT INTO test (name)
VALUES ('Ryan:Getzlaf');

DeleteContact:
DELETE FROM test WHERE id = ?;

selectNames:
SELECT * FROM test;

如何在SQLDelight上运行SELECT命令?

0 个答案:

没有答案