by samuelstros · 2y ago · 0 comments
- File locking, concurrency, etc., are problems that SQLite solves
- Using SQLite allows drumroll querying files with SQL instead of platform-dependent fs APIs
- Using SQL queries is typesafe with Kysely https://kysely.dev/ (without the need for an ORM)
Wow, this is even better than what I've seen people do with F# type providers. Cool cool cool.
[0] https://github.com/opral/monorepo/blob/99356e577f558f4442a95...
diff --git a/packages/lix-sdk/src/query-utilities/is-in-simulated-branch.ts b/packages/lix-sdk/src/query-utilities/is-in-simulated-branch.ts
index 7d677477e..39502f245 100644
--- a/packages/lix-sdk/src/query-utilities/is-in-simulated-branch.ts
+++ b/packages/lix-sdk/src/query-utilities/is-in-simulated-branch.ts
@@ -21,10 +21,9 @@ export function isInSimulatedCurrentBranch(
// change is not in a conflict
eb("change.id", "not in", (subquery) =>
subquery.selectFrom("conflict").select("conflict.change_id").unionAll(
- // @ts-expect-error - no idea why
subquery
.selectFrom("conflict")
- .select("conflict.conflicting_change_id"),
+ .select("conflict.conflicting_change_id as change_id"),
),
),
// change is in a conflict that has not been resolvedWhat are your reasons for advocating for SQLite as a filesystem abstraction?
- target the browser
- supports any file format, not just text files
- understands changes, not just versioning of files
- suited to build web apps on top
- ultimately enable 1000's of artists, designers, lawyers, civil engineers, etc. to collaborate
we are 2 years into the journey. dec 16, we'll release a public preview