# Class SQLiteBlobJsonBuilder<T>

#### Type Parameters

- T extends ColumnBuilderBaseConfig<"json", "SQLiteBlobJson">

#### Hierarchy (View Summary)

- SQLiteColumnBuilder<T>
  - SQLiteBlobJsonBuilder

- 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/columns/blob.d.ts:33

##### Index

### Constructors

constructor

### Properties

_
$default
$onUpdate
config
[entityKind]

### Methods

$defaultFn
$onUpdateFn
$type
default
generatedAlwaysAs
notNull
primaryKey
references
unique

## Constructors

### constructor

- new SQLiteBlobJsonBuilder<
  T extends ColumnBuilderBaseConfig<"json", "SQLiteBlobJson">,
  >(
  name: T["name"],
  ): SQLiteBlobJsonBuilder<T>

  #### Type Parameters

  - T extends ColumnBuilderBaseConfig<"json", "SQLiteBlobJson">

  #### Parameters

  - name: T["name"]

  #### Returns SQLiteBlobJsonBuilder<T>

  Overrides SQLiteColumnBuilder.constructor

  - 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/columns/blob.d.ts:35

## Properties

### _

_: {
brand: "ColumnBuilder";
columnType: T["columnType"];
data: T["data"];
dataType: T["dataType"];
dialect: "sqlite";
driverParam: T["driverParam"];
enumValues: T["enumValues"];
generated: T extends { generated: G }
? G extends undefined ? unknown : G
: unknown;
hasDefault: T extends { hasDefault: U } ? U : boolean;
identity: T extends { identity: U } ? U : unknown;
name: T["name"];
notNull: T extends { notNull: U } ? U : boolean;
}

Inherited from SQLiteColumnBuilder._

- 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/column-builder.d.ts:158

### $default

$default: (
fn: () => SQL<unknown> | T["data"],
) => HasRuntimeDefault<HasDefault<SQLiteBlobJsonBuilder<T>>>

Alias for $defaultFn.

Inherited from SQLiteColumnBuilder.$default

- 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/column-builder.d.ts:201

### $onUpdate

$onUpdate: (
fn: () => SQL<unknown> | T["data"],
) => HasDefault<SQLiteBlobJsonBuilder<T>>

Alias for $onUpdateFn.

Inherited from SQLiteColumnBuilder.$onUpdate

- 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/column-builder.d.ts:217

### `Protected` config

config: ColumnBuilderRuntimeConfig<T["data"], object>

Inherited from SQLiteColumnBuilder.config

- 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/column-builder.d.ts:159

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

"[entityKind]": string

Overrides SQLiteColumnBuilder.[entityKind]

- 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/columns/blob.d.ts:34

## Methods

### $defaultFn

- $defaultFn(
  fn: () => SQL<unknown> | T["data"],
  ): HasRuntimeDefault<HasDefault<SQLiteBlobJsonBuilder<T>>>

  Adds a dynamic default value to the column. The function will be called when the row is inserted, and the returned value will be used as the column value.

  Note: This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.

  #### Parameters

  - fn: () => SQL<unknown> | T["data"]

  #### Returns HasRuntimeDefault<HasDefault<SQLiteBlobJsonBuilder<T>>>

  Inherited from SQLiteColumnBuilder.$defaultFn

  - 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/column-builder.d.ts:195

### $onUpdateFn

- $onUpdateFn(
  fn: () => SQL<unknown> | T["data"],
  ): HasDefault<SQLiteBlobJsonBuilder<T>>

  Adds a dynamic update value to the column. The function will be called when the row is updated, and the returned value will be used as the column value if none is provided. If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.

  Note: This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.

  #### Parameters

  - fn: () => SQL<unknown> | T["data"]

  #### Returns HasDefault<SQLiteBlobJsonBuilder<T>>

  Inherited from SQLiteColumnBuilder.$onUpdateFn

  - 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/column-builder.d.ts:211

### $type

- $type<TType>(): $Type<SQLiteBlobJsonBuilder<T>, TType>

  Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types.

  #### Type Parameters

  - TType

  #### Returns $Type<SQLiteBlobJsonBuilder<T>, TType>

  #### Example

      const users = pgTable('users', {
      	id: integer('id').$type<UserId>().primaryKey(),
      	details: json('details').$type<UserDetails>().notNull(),
      });

  Inherited from SQLiteColumnBuilder.$type

  - 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/column-builder.d.ts:172

### default

- default(value: SQL<unknown> | T["data"]): HasDefault<SQLiteBlobJsonBuilder<T>>

  Adds a `default <value>` clause to the column definition.

  Affects the `insert` model of the table - columns with `default` are optional on insert.

  If you need to set a dynamic default value, use $defaultFn instead.

  #### Parameters

  - value: SQL<unknown> | T["data"]

  #### Returns HasDefault<SQLiteBlobJsonBuilder<T>>

  Inherited from SQLiteColumnBuilder.default

  - 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/column-builder.d.ts:186

### generatedAlwaysAs

- generatedAlwaysAs(
  as: SQL<unknown> | (() => SQL) | T["data"],
  config?: SQLiteGeneratedColumnConfig,
  ): HasGenerated<SQLiteBlobJsonBuilder<T>, { type: "always" }>

  #### Parameters

  - as: SQL<unknown> | (() => SQL) | T["data"]
  - `Optional` config: SQLiteGeneratedColumnConfig

  #### Returns HasGenerated<SQLiteBlobJsonBuilder<T>, { type: "always" }>

  Inherited from SQLiteColumnBuilder.generatedAlwaysAs

  - 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/columns/common.d.ts:31

### notNull

- notNull(): NotNull<SQLiteBlobJsonBuilder<T>>

  Adds a `not null` clause to the column definition.

  Affects the `select` model of the table - columns without `not null` will be nullable on select.

  #### Returns NotNull<SQLiteBlobJsonBuilder<T>>

  Inherited from SQLiteColumnBuilder.notNull

  - 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/column-builder.d.ts:178

### primaryKey

- primaryKey(): IsPrimaryKey<NotNull<SQLiteBlobJsonBuilder<T>>>

  Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`.

  In SQLite, `integer primary key` implicitly makes the column auto-incrementing.

  #### Returns IsPrimaryKey<NotNull<SQLiteBlobJsonBuilder<T>>>

  Inherited from SQLiteColumnBuilder.primaryKey

  - 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/column-builder.d.ts:225

### references

- references(
  ref: () => SQLiteColumn,
  actions?: { onDelete?: UpdateDeleteAction; onUpdate?: UpdateDeleteAction },
  ): this

  #### Parameters

  - ref: () => SQLiteColumn
  - `Optional` actions: { onDelete?: UpdateDeleteAction; onUpdate?: UpdateDeleteAction }

  #### Returns this

  Inherited from SQLiteColumnBuilder.references

  - 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/columns/common.d.ts:29

### unique

- unique(name?: string): this

  #### Parameters

  - `Optional` name: string

  #### Returns this

  Inherited from SQLiteColumnBuilder.unique

  - 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/columns/common.d.ts:30