Documentation
Preparing search index...
@rivetkit/db
drizzle/mod
ViewBuilder
Class ViewBuilder<TName>
Type Parameters
TName
extends
string
=
string
Hierarchy (
View Summary
)
ViewBuilderCore
<
{
name
:
TName
}
>
ViewBuilder
Index
Constructors
constructor
Properties
_
config
name
[entity
Kind]
Methods
as
Constructors
constructor
new
ViewBuilder
<
TName
extends
string
=
string
>
(
name
:
TName
)
:
ViewBuilder
<
TName
>
Type Parameters
TName
extends
string
=
string
Parameters
name
:
TName
Returns
ViewBuilder
<
TName
>
Properties
Readonly
_
_
:
{
columns
:
unknown
;
name
:
TName
}
Protected
config
config
:
ViewBuilderConfig
Protected
name
name
:
TName
Static
Readonly
[entity
Kind]
"[entityKind]"
:
string
Methods
as
as
<
TSelection
extends
ColumnsSelection
>
(
qb
:
|
TypedQueryBuilder
<
TSelection
,
unknown
,
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
TypedQueryBuilder
<
TSelection
>
)
,
)
:
SQLiteViewWithSelection
<
TName
,
false
,
{
[
K
in
string
|
number
|
symbol
]
:
(
IsAny
<
TSelection
>
extends
true
?
any
:
{
[
Key
in
string
|
number
|
symbol
]
:
TSelection
[
Key
]
extends
Column
<
ColumnBaseConfig
<
ColumnDataType
,
string
>
,
object
,
object
,
>
?
SQLiteColumn
<
{
baseColumn
:
any
[
any
]
[
"_"
]
extends
{
baseBuilder
:
U
}
?
Column
<
{
baseColumn
:
...
;
columnType
:
...
;
data
:
...
;
dataType
:
...
;
driverParam
:
...
;
enumValues
:
...
;
generated
:
...
;
hasDefault
:
...
;
hasRuntimeDefault
:
...
;
identity
:
...
;
isAutoincrement
:
...
;
isPrimaryKey
:
...
;
name
:
...
;
notNull
:
...
;
tableName
:
...
;
}
,
{}
,
{
[
K
in
(...)
]
:
(...)
}
,
>
:
never
;
columnType
:
any
[
any
]
[
"_"
]
[
"columnType"
]
;
data
:
any
[
any
]
[
"_"
]
extends
{
$type
:
U
}
?
U
:
(...)
[
(...)
]
[
"data"
]
;
dataType
:
any
[
any
]
[
"_"
]
[
"dataType"
]
;
driverParam
:
any
[
any
]
[
"_"
]
[
"driverParam"
]
;
enumValues
:
any
[
any
]
[
"_"
]
[
"enumValues"
]
;
generated
:
any
[
any
]
[
"_"
]
extends
{
generated
:
G
}
?
unknown
extends
G
?
undefined
:
(...)
extends
(...)
?
(...)
:
(...)
:
undefined
;
hasDefault
:
any
[
any
]
[
"_"
]
extends
{
hasDefault
:
true
}
?
true
:
false
;
hasRuntimeDefault
:
any
[
any
]
[
"_"
]
extends
{
hasRuntimeDefault
:
true
}
?
true
:
false
;
identity
:
any
[
any
]
[
"_"
]
extends
{
identity
:
"always"
}
?
"always"
:
(...)
[
(...)
]
extends
{
identity
:
...
}
?
"byDefault"
:
undefined
;
isAutoincrement
:
any
[
any
]
[
"_"
]
extends
{
isAutoincrement
:
true
}
?
true
:
false
;
isPrimaryKey
:
any
[
any
]
[
"_"
]
extends
{
isPrimaryKey
:
true
}
?
true
:
false
;
name
:
any
[
any
]
[
"_"
]
[
"name"
]
;
notNull
:
any
[
any
]
[
"_"
]
extends
{
notNull
:
true
}
?
true
:
false
;
tableName
:
TName
;
}
,
{}
,
{}
,
>
:
TSelection
[
Key
]
extends
Table
<
TableConfig
<
Column
<
any
,
object
,
object
>
>
,
>
?
{
[
K
in
string
|
number
|
symbol
]
:
(
IsAny
<
(...)
>
extends
true
?
any
:
{
[
Key
in
(...)
]
:
(...)
}
)
[
K
]
}
:
TSelection
[
Key
]
extends
SQL
<
unknown
>
|
Aliased
<
unknown
>
?
any
[
any
]
:
TSelection
[
Key
]
extends
ColumnsSelection
?
{
[
Key
in
(...)
|
(...)
|
(...)
]
:
(...)
extends
(...)
?
(...)
:
(...)
}
:
never
}
)
[
K
]
}
,
>
Type Parameters
TSelection
extends
ColumnsSelection
Parameters
qb
:
|
TypedQueryBuilder
<
TSelection
,
unknown
,
unknown
>
|
(
(
qb
:
QueryBuilder
)
=>
TypedQueryBuilder
<
TSelection
>
)
Returns
SQLiteViewWithSelection
<
TName
,
false
,
{
[
K
in
string
|
number
|
symbol
]
:
(
IsAny
<
TSelection
>
extends
true
?
any
:
{
[
Key
in
string
|
number
|
symbol
]
:
TSelection
[
Key
]
extends
Column
<
ColumnBaseConfig
<
ColumnDataType
,
string
>
,
object
,
object
,
>
?
SQLiteColumn
<
{
baseColumn
:
any
[
any
]
[
"_"
]
extends
{
baseBuilder
:
U
}
?
Column
<
{
baseColumn
:
...
;
columnType
:
...
;
data
:
...
;
dataType
:
...
;
driverParam
:
...
;
enumValues
:
...
;
generated
:
...
;
hasDefault
:
...
;
hasRuntimeDefault
:
...
;
identity
:
...
;
isAutoincrement
:
...
;
isPrimaryKey
:
...
;
name
:
...
;
notNull
:
...
;
tableName
:
...
;
}
,
{}
,
{
[
K
in
(...)
]
:
(...)
}
,
>
:
never
;
columnType
:
any
[
any
]
[
"_"
]
[
"columnType"
]
;
data
:
any
[
any
]
[
"_"
]
extends
{
$type
:
U
}
?
U
:
(...)
[
(...)
]
[
"data"
]
;
dataType
:
any
[
any
]
[
"_"
]
[
"dataType"
]
;
driverParam
:
any
[
any
]
[
"_"
]
[
"driverParam"
]
;
enumValues
:
any
[
any
]
[
"_"
]
[
"enumValues"
]
;
generated
:
any
[
any
]
[
"_"
]
extends
{
generated
:
G
}
?
unknown
extends
G
?
undefined
:
(...)
extends
(...)
?
(...)
:
(...)
:
undefined
;
hasDefault
:
any
[
any
]
[
"_"
]
extends
{
hasDefault
:
true
}
?
true
:
false
;
hasRuntimeDefault
:
any
[
any
]
[
"_"
]
extends
{
hasRuntimeDefault
:
true
}
?
true
:
false
;
identity
:
any
[
any
]
[
"_"
]
extends
{
identity
:
"always"
}
?
"always"
:
(...)
[
(...)
]
extends
{
identity
:
...
}
?
"byDefault"
:
undefined
;
isAutoincrement
:
any
[
any
]
[
"_"
]
extends
{
isAutoincrement
:
true
}
?
true
:
false
;
isPrimaryKey
:
any
[
any
]
[
"_"
]
extends
{
isPrimaryKey
:
true
}
?
true
:
false
;
name
:
any
[
any
]
[
"_"
]
[
"name"
]
;
notNull
:
any
[
any
]
[
"_"
]
extends
{
notNull
:
true
}
?
true
:
false
;
tableName
:
TName
;
}
,
{}
,
{}
,
>
:
TSelection
[
Key
]
extends
Table
<
TableConfig
<
Column
<
any
,
object
,
object
>
>
,
>
?
{
[
K
in
string
|
number
|
symbol
]
:
(
IsAny
<
(...)
>
extends
true
?
any
:
{
[
Key
in
(...)
]
:
(...)
}
)
[
K
]
}
:
TSelection
[
Key
]
extends
SQL
<
unknown
>
|
Aliased
<
unknown
>
?
any
[
any
]
:
TSelection
[
Key
]
extends
ColumnsSelection
?
{
[
Key
in
(...)
|
(...)
|
(...)
]
:
(...)
extends
(...)
?
(...)
:
(...)
}
:
never
}
)
[
K
]
}
,
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
_
config
name
[entity
Kind]
Methods
as
Documentation
Loading...