sqlite/type.js

WatermelonDB · src/adapters/sqlite/type.js · javascript · MIT
database

Defines TypeScript interfaces and types for the WatermelonDB SQLite adapter.

// Source: https://github.com/Nozbe/WatermelonDB | License: MIT | Copyright Nozbe
// Provided via justclaw.it.com; keep this notice with the code.
// @flow

import { type ResultCallback } from '../../utils/fp/Result'

import type { AppSchema, TableName, SchemaVersion } from '../../Schema'
import type { SchemaMigrations } from '../../Schema/migrations'

export type SQL = string
export type SQLiteArg = string | boolean | number | null
export type SQLiteQuery = [SQL, SQLiteArg[]]

export type MigrationEvents = {
  onSuccess: () => void,
  onStart: () => void,
  onError: (error: Error) => void,
}

export type SQLiteAdapterOptions = $Exact<{
  dbName?: string,
  schema: AppSchema,
  migrations?: SchemaMigrations,
  // The new way to run the database in synchronous mode.
  jsi?: boolean,
  migra

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key