fixed drizzle rust logic

This commit is contained in:
2025-10-21 16:29:13 +02:00
parent e268947593
commit 9ea057e943
13 changed files with 151 additions and 112 deletions

View File

@ -38,6 +38,7 @@ export const useWorkspaceStore = defineStore('workspaceStore', () => {
.from(haexWorkspaces)
.orderBy(asc(haexWorkspaces.position))
console.log('loadWorkspacesAsync', items)
workspaces.value = items
// Create default workspace if none exist

View File

@ -142,7 +142,10 @@ const drizzleCallback = (async (
if (isSelectQuery(sql)) {
// SELECT statements
rows = await invoke<unknown[]>('sql_select', { sql, params }).catch((e) => {
rows = await invoke<unknown[]>('sql_select_with_crdt', {
sql,
params,
}).catch((e) => {
console.error('SQL select Error:', e, sql, params)
return []
})
@ -164,9 +167,9 @@ const drizzleCallback = (async (
console.error('SQL execute with CRDT Error:', e, sql, params, rows)
return []
})
return { rows: undefined }
}
console.log('drizzle found', rows)
if (method === 'get') {
return { rows: rows.length > 0 ? [rows[0]] : [] }
} else {