Skip to main content

SqlExecutor

Extended by

Properties

PropertyTypeDescription
execute<T>(query, params?) => Promise<QueryResult<T>>Execute a SQL write (INSERT/UPDATE/DELETE) query and optionally return results. When using the default client-side JSON-based view system, the returned result's rowsAffected may be 0 for successful UPDATE and DELETE statements. Use a RETURNING clause and inspect result.rows when you need to confirm which rows changed.
executeBatch(query, params?) => Promise<QueryResult<never>>Execute a write query (INSERT/UPDATE/DELETE) multiple times with each parameter set and optionally return results. This is faster than executing separately with each parameter set.
executeRaw(query, params?) => Promise<RawQueryResult>Execute a SQL write (INSERT/UPDATE/DELETE) query directly on the database without any PowerSync processing. This bypasses certain PowerSync abstractions and is useful for accessing the raw database results.