# Class SQLiteSession<TResultKind, TRunResult, TFullSchema, TSchema>`Abstract`

#### Type Parameters

- TResultKind extends "sync" | "async"
- TRunResult
- TFullSchema extends Record<string, unknown>
- TSchema extends TablesRelationalConfig

- Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:55

##### Index

### Constructors

constructor

### Properties

[entityKind]

### Methods

all
count
get
prepareOneTimeQuery
prepareQuery
run
transaction
values

## Constructors

### constructor

- new SQLiteSession<
  TResultKind extends "sync"
  | "async",
  TRunResult,
  TFullSchema extends Record<string, unknown>,
  TSchema extends TablesRelationalConfig,
  >(): SQLiteSession<TResultKind, TRunResult, TFullSchema, TSchema>

  #### Type Parameters

  - TResultKind extends "sync" | "async"
  - TRunResult
  - TFullSchema extends Record<string, unknown>
  - TSchema extends TablesRelationalConfig

  #### Returns SQLiteSession<TResultKind, TRunResult, TFullSchema, TSchema>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:57

## Properties

### `Static` `Readonly`[entityKind]

"[entityKind]": string

- Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:56

## Methods

### all

- all<T = unknown>(query: SQL): Result<TResultKind, T[]>

  #### Type Parameters

  - T = unknown

  #### Parameters

  - query: SQL

  #### Returns Result<TResultKind, T[]>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:77

### count

- count(sql: SQL): Promise<number>

  #### Parameters

  - sql: SQL

  #### Returns Promise<number>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:80

### get

- get<T = unknown>(query: SQL): Result<TResultKind, T>

  #### Type Parameters

  - T = unknown

  #### Parameters

  - query: SQL

  #### Returns Result<TResultKind, T>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:78

### prepareOneTimeQuery

- prepareOneTimeQuery(
  query: Query,
  fields: SelectedFieldsOrdered | undefined,
  executeMethod: SQLiteExecuteMethod,
  isResponseInArrayMode: boolean,
  customResultMapper?: (
  rows: unknown[][],
  mapColumnValue?: (value: unknown) => unknown,
  ) => unknown,
  queryMetadata?: {
  tables: string[];
  type: "insert" | "select" | "update" | "delete";
  },
  cacheConfig?: WithCacheConfig,
  ): SQLitePreparedQuery<PreparedQueryConfig & { type: TResultKind }>

  #### Parameters

  - query: Query
  - fields: SelectedFieldsOrdered | undefined
  - executeMethod: SQLiteExecuteMethod
  - isResponseInArrayMode: boolean
  - `Optional` customResultMapper: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown
  - `Optional` queryMetadata: { tables: string[]; type: "insert" | "select" | "update" | "delete" }
  - `Optional` cacheConfig: WithCacheConfig

  #### Returns SQLitePreparedQuery<PreparedQueryConfig & { type: TResultKind }>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:69

### `Abstract` prepareQuery

- prepareQuery(
  query: Query,
  fields: SelectedFieldsOrdered | undefined,
  executeMethod: SQLiteExecuteMethod,
  isResponseInArrayMode: boolean,
  customResultMapper?: (
  rows: unknown[][],
  mapColumnValue?: (value: unknown) => unknown,
  ) => unknown,
  queryMetadata?: {
  tables: string[];
  type: "insert" | "select" | "update" | "delete";
  },
  cacheConfig?: WithCacheConfig,
  ): SQLitePreparedQuery<PreparedQueryConfig & { type: TResultKind }>

  #### Parameters

  - query: Query
  - fields: SelectedFieldsOrdered | undefined
  - executeMethod: SQLiteExecuteMethod
  - isResponseInArrayMode: boolean
  - `Optional` customResultMapper: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown
  - `Optional` queryMetadata: { tables: string[]; type: "insert" | "select" | "update" | "delete" }
  - `Optional` cacheConfig: WithCacheConfig

  #### Returns SQLitePreparedQuery<PreparedQueryConfig & { type: TResultKind }>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:63

### run

- run(query: SQL): Result<TResultKind, TRunResult>

  #### Parameters

  - query: SQL

  #### Returns Result<TResultKind, TRunResult>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:76

### `Abstract` transaction

- transaction<T>(
  transaction: (
  tx: SQLiteTransaction<TResultKind, TRunResult, TFullSchema, TSchema>,
  ) => Result<TResultKind, T>,
  config?: SQLiteTransactionConfig,
  ): Result<TResultKind, T>

  #### Type Parameters

  - T

  #### Parameters

  - transaction: (
    tx: SQLiteTransaction<TResultKind, TRunResult, TFullSchema, TSchema>,
    ) => Result<TResultKind, T>
  - `Optional` config: SQLiteTransactionConfig

  #### Returns Result<TResultKind, T>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:75

### values

- values<T extends any[] = unknown[]>(query: SQL): Result<TResultKind, T[]>

  #### Type Parameters

  - T extends any[] = unknown[]

  #### Parameters

  - query: SQL

  #### Returns Result<TResultKind, T[]>

  - Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/session.d.ts:79