Documentation
Preparing search index...
@rivetkit/db
drizzle/mod
WithBuilder
Interface WithBuilder
WithBuilder
<
TAlias
extends
string
>
(
alias
:
TAlias
,
)
:
{
as
:
{
<
TSelection
extends
ColumnsSelection
>
(
qb
:
|
TypedQueryBuilder
<
TSelection
,
unknown
,
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
TypedQueryBuilder
<
TSelection
>
)
,
)
:
WithSubqueryWithSelection
<
TSelection
,
TAlias
>
;
(
qb
:
|
TypedQueryBuilder
<
undefined
,
unknown
,
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
TypedQueryBuilder
<
undefined
>
)
,
)
:
WithSubqueryWithoutSelection
<
TAlias
>
;
}
;
}
Type Parameters
TAlias
extends
string
Parameters
alias
:
TAlias
Returns
{
as
:
{
<
TSelection
extends
ColumnsSelection
>
(
qb
:
|
TypedQueryBuilder
<
TSelection
,
unknown
,
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
TypedQueryBuilder
<
TSelection
>
)
,
)
:
WithSubqueryWithSelection
<
TSelection
,
TAlias
>
;
(
qb
:
|
TypedQueryBuilder
<
undefined
,
unknown
,
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
TypedQueryBuilder
<
undefined
>
)
,
)
:
WithSubqueryWithoutSelection
<
TAlias
>
;
}
;
}
WithBuilder
<
TAlias
extends
string
,
TSelection
extends
ColumnsSelection
>
(
alias
:
TAlias
,
selection
:
TSelection
,
)
:
{
as
:
(
qb
:
SQL
<
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
SQL
)
,
)
=>
WithSubqueryWithSelection
<
TSelection
,
TAlias
>
;
}
Type Parameters
TAlias
extends
string
TSelection
extends
ColumnsSelection
Parameters
alias
:
TAlias
selection
:
TSelection
Returns
{
as
:
(
qb
:
SQL
<
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
SQL
)
,
)
=>
WithSubqueryWithSelection
<
TSelection
,
TAlias
>
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Documentation
Loading...