# Class QueryBuilder

- 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/query-builders/query-builder.d.ts:8

##### Index

### Constructors

constructor

### Properties

$with
[entityKind]

### Methods

select
selectDistinct
with

## Constructors

### constructor

- new QueryBuilder(dialect?: SQLiteDialect | SQLiteDialectConfig): QueryBuilder

  #### Parameters

  - `Optional` dialect: SQLiteDialect | SQLiteDialectConfig

  #### Returns QueryBuilder

  - 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/query-builders/query-builder.d.ts:12

## Properties

### $with

$with: WithBuilder

- 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/query-builders/query-builder.d.ts:13

### `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/query-builders/query-builder.d.ts:9

## Methods

### select

- select(): SQLiteSelectBuilder<undefined, "sync", void, "qb">

  #### Returns SQLiteSelectBuilder<undefined, "sync", void, "qb">

  - 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/query-builders/query-builder.d.ts:24
- select<TSelection extends SelectedFields>(
  fields: TSelection,
  ): SQLiteSelectBuilder<TSelection, "sync", void, "qb">

  #### Type Parameters

  - TSelection extends SelectedFields

  #### Parameters

  - fields: TSelection

  #### Returns SQLiteSelectBuilder<TSelection, "sync", void, "qb">

  - 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/query-builders/query-builder.d.ts:25

### selectDistinct

- selectDistinct(): SQLiteSelectBuilder<undefined, "sync", void, "qb">

  #### Returns SQLiteSelectBuilder<undefined, "sync", void, "qb">

  - 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/query-builders/query-builder.d.ts:26
- selectDistinct<TSelection extends SelectedFields>(
  fields: TSelection,
  ): SQLiteSelectBuilder<TSelection, "sync", void, "qb">

  #### Type Parameters

  - TSelection extends SelectedFields

  #### Parameters

  - fields: TSelection

  #### Returns SQLiteSelectBuilder<TSelection, "sync", void, "qb">

  - 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/query-builders/query-builder.d.ts:27

### with

- with(
  ...queries: WithSubquery<string, Record<string, unknown>>[],
  ): {
  select: {
  (): SQLiteSelectBuilder<undefined, "sync", void, "qb">;
  <TSelection extends SelectedFields>(
  fields: TSelection,
  ): SQLiteSelectBuilder<TSelection, "sync", void, "qb">;
  };
  selectDistinct: {
  (): SQLiteSelectBuilder<undefined, "sync", void, "qb">;
  <TSelection extends SelectedFields>(
  fields: TSelection,
  ): SQLiteSelectBuilder<TSelection, "sync", void, "qb">;
  };
  }

  #### Parameters

  - ...queries: WithSubquery<string, Record<string, unknown>>[]

  #### Returns {
  select: {
  (): SQLiteSelectBuilder<undefined, "sync", void, "qb">;
  <TSelection extends SelectedFields>(
  fields: TSelection,
  ): SQLiteSelectBuilder<TSelection, "sync", void, "qb">;
  };
  selectDistinct: {
  (): SQLiteSelectBuilder<undefined, "sync", void, "qb">;
  <TSelection extends SelectedFields>(
  fields: TSelection,
  ): SQLiteSelectBuilder<TSelection, "sync", void, "qb">;
  };
  }

  - 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/query-builders/query-builder.d.ts:14