From f6a564137af1e463fde621bdb96168852336cfd5 Mon Sep 17 00:00:00 2001 From: Steven Ontong Date: Wed, 20 Mar 2024 10:29:45 +0200 Subject: [PATCH] ignore dialect bin files --- .gitignore | 3 ++- ...h.sqldelight.dialect.api.SqlDelightDialect | 1 - .../com/powersync/sqlite/PowerSyncDialect.kt | 25 ------------------- 3 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 dialect/bin/main/META-INF/services/app.cash.sqldelight.dialect.api.SqlDelightDialect delete mode 100644 dialect/bin/main/com/powersync/sqlite/PowerSyncDialect.kt diff --git a/.gitignore b/.gitignore index 052ece8b..5c7eca62 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ captures !*.xcworkspace/contents.xcworkspacedata **/xcshareddata/WorkspaceSettings.xcsettings Pods/ -plugins/sonatype \ No newline at end of file +plugins/sonatype +dialect/bin \ No newline at end of file diff --git a/dialect/bin/main/META-INF/services/app.cash.sqldelight.dialect.api.SqlDelightDialect b/dialect/bin/main/META-INF/services/app.cash.sqldelight.dialect.api.SqlDelightDialect deleted file mode 100644 index 2d4118ed..00000000 --- a/dialect/bin/main/META-INF/services/app.cash.sqldelight.dialect.api.SqlDelightDialect +++ /dev/null @@ -1 +0,0 @@ -com.powersync.sqlite.PowerSyncDialect diff --git a/dialect/bin/main/com/powersync/sqlite/PowerSyncDialect.kt b/dialect/bin/main/com/powersync/sqlite/PowerSyncDialect.kt deleted file mode 100644 index a97e3639..00000000 --- a/dialect/bin/main/com/powersync/sqlite/PowerSyncDialect.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.powersync.sqlite - -import app.cash.sqldelight.dialect.api.IntermediateType -import app.cash.sqldelight.dialect.api.PrimitiveType -import app.cash.sqldelight.dialect.api.SqlDelightDialect -import app.cash.sqldelight.dialect.api.TypeResolver -import app.cash.sqldelight.dialects.sqlite_3_35.SqliteTypeResolver -import app.cash.sqldelight.dialects.sqlite_3_38.SqliteDialect as Sqlite338Dialect -import com.alecstrong.sql.psi.core.psi.SqlFunctionExpr - -class PowerSyncDialect : SqlDelightDialect by Sqlite338Dialect() { - override fun typeResolver(parentResolver: TypeResolver) = PowerSyncTypeResolver(parentResolver) -} - -class PowerSyncTypeResolver(private val parentResolver: TypeResolver) : - TypeResolver by SqliteTypeResolver(parentResolver) { - override fun functionType(functionExpr: SqlFunctionExpr): IntermediateType? { - when (functionExpr.functionName.text) { - "sqlite_version", "powersync_rs_version", "powersync_replace_schema" -> return IntermediateType( - PrimitiveType.TEXT - ) - } - return parentResolver.functionType(functionExpr) - } -}