Skip to main content
Version: 4.4

Interface: Where<TRecord, TResult>#

knex.Knex.Where

Type parameters#

NameDefault
TRecordany
TResultunknown

Hierarchy#

Callable#

Where(raw: Raw<any>): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
rawRaw<any>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1205

Where(callback: QueryCallback<TRecord, TResult>): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
callbackQueryCallback<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1206

Where(object: Readonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<ResolveTableType<TRecord, base>>, {}>>>): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
objectReadonly<Partial<AnyOrUnknownToOther<MaybeRawRecord<ResolveTableType<TRecord, base>>, {}>>>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1208

Where(object: Readonly<Object>): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
objectReadonly<Object>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1210

Where<T>(columnName: T, value: null | Readonly<ResolveTableType<TRecord, base>[T]> | Readonly<Raw<ResolveTableType<TRecord, base>[T]>>): QueryBuilder<TRecord, TResult>

Type parameters:#

NameType
Tstring | number | symbol

Parameters:#

NameType
columnNameT
valuenull | Readonly<ResolveTableType<TRecord, base>[T]> | Readonly<Raw<ResolveTableType<TRecord, base>[T]>>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1212

Where(columnName: string, value: Value): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
columnNamestring
valueValue

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1217

Where<T>(columnName: T, operator: ComparisonOperator, value: null | Readonly<ResolveTableType<TRecord, base>[T]> | Readonly<Raw<ResolveTableType<TRecord, base>[T]>>): QueryBuilder<TRecord, TResult>

Type parameters:#

NameType
Tstring | number | symbol

Parameters:#

NameType
columnNameT
operatorComparisonOperator
valuenull | Readonly<ResolveTableType<TRecord, base>[T]> | Readonly<Raw<ResolveTableType<TRecord, base>[T]>>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1219

Where(columnName: string, operator: string, value: Value): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
columnNamestring
operatorstring
valueValue

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1225

Where<T, TRecordInner, TResultInner>(columnName: T, operator: ComparisonOperator, value: QueryBuilder<TRecordInner, TResultInner>): QueryBuilder<TRecord, TResult>

Type parameters:#

NameType
Tstring | number | symbol
TRecordInner-
TResultInner-

Parameters:#

NameType
columnNameT
operatorComparisonOperator
valueQueryBuilder<TRecordInner, TResultInner>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1230

Where<TRecordInner, TResultInner>(columnName: string, operator: string, value: QueryBuilder<TRecordInner, TResultInner>): QueryBuilder<TRecord, TResult>

Type parameters:#

Name
TRecordInner
TResultInner

Parameters:#

NameType
columnNamestring
operatorstring
valueQueryBuilder<TRecordInner, TResultInner>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1236

Where(left: Raw<any>, operator: string, right: Value): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
leftRaw<any>
operatorstring
rightValue

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1242

Where<TRecordInner, TResultInner>(left: Raw<any>, operator: string, right: QueryBuilder<TRecordInner, TResultInner>): QueryBuilder<TRecord, TResult>

Type parameters:#

Name
TRecordInner
TResultInner

Parameters:#

NameType
leftRaw<any>
operatorstring
rightQueryBuilder<TRecordInner, TResultInner>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1247

Where(condition: boolean): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
conditionboolean

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1257

Where<TResult2>(sql: string, bindings?: null | string | number | boolean | Date | Buffer | string[] | number[] | Date[] | boolean[] | Raw<any> | ValueDict | QueryBuilder<any, any> | readonly RawBinding[]): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2TResult

Parameters:#

NameType
sqlstring
bindings?null | string | number | boolean | Date | Buffer | string[] | number[] | Date[] | boolean[] | Raw<any> | ValueDict | QueryBuilder<any, any> | readonly RawBinding[]

Returns: QueryBuilder<TRecord, TResult2>

Defined in: node_modules/knex/types/index.d.ts:1483

Where<TResult2>(raw: Raw<TResult2>): QueryBuilder<TRecord, TResult2>

Type parameters:#

NameDefault
TResult2TResult

Parameters:#

NameType
rawRaw<TResult2>

Returns: QueryBuilder<TRecord, TResult2>

Defined in: node_modules/knex/types/index.d.ts:1487

Where(callback: QueryCallback<TRecord, TResult>): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
callbackQueryCallback<TRecord, TResult>

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1261

Where(columnName: keyof TRecord): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
columnNamekeyof TRecord

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1265

Where(columnName: string): QueryBuilder<TRecord, TResult>

Parameters:#

NameType
columnNamestring

Returns: QueryBuilder<TRecord, TResult>

Defined in: node_modules/knex/types/index.d.ts:1266

Last updated on by Martin Adámek