Skip to content

Empty result when query with kysely + libsql at version 0.6.0-pre.9 #195

@osddeitf

Description

@osddeitf

I have a setup of kysely + better-sqlite3. But it wasn't working with Deno, so I swtich to this library. It worked at first, until...

I needed to patch it:

diff --git a/node_modules/libsql/wrapper.js b/node_modules/libsql/wrapper.js
index 732b19f..a0da2b1 100644
--- a/node_modules/libsql/wrapper.js
+++ b/node_modules/libsql/wrapper.js
@@ -255,6 +255,7 @@ class Statement {
   }
 
   get reader() {
+    return null
     throw new Error("not implemented");
   }

I did some batch inserts and it worked just fine but when I query, it just returns empty:

const rows = await db.selectFrom("lookup")
    .selectAll()
    .executeTakeFirstOrThrow()

I checked and made extra sure the table had data.

I changed the version from 0.6.0-pre.9 to 0.5.13 and it worked without the patch above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions