@rvoh/dream
Preparing search index...
types
BelongsToStatement
Interface BelongsToStatement<BaseInstance, DB, Schema, TableName>
interface
BelongsToStatement
<
BaseInstance
extends
Dream
,
DB
,
Schema
,
TableName
extends
AssociationTableNames
<
DB
,
Schema
>
&
keyof
DB
,
>
{
as
:
string
;
distinct
:
null
;
foreignKey
:
()
=>
keyof
BaseInstance
[
"DB"
]
[
BaseInstance
[
"table"
]
&
keyof
BaseInstance
[
"DB"
]
]
&
string
;
foreignKeyTypeField
:
()
=>
keyof
BaseInstance
[
"DB"
]
[
BaseInstance
[
"table"
]
&
keyof
BaseInstance
[
"DB"
]
]
&
string
;
globalAssociationNameOrNames
:
string
[]
;
modelCB
:
()
=>
typeof
Dream
|
typeof
Dream
[]
;
optional
:
boolean
;
polymorphic
:
boolean
;
primaryKey
:
(
associationInstance
?:
Dream
,
opts
?:
{
associatedClassOverride
?:
typeof
Dream
}
,
)
=>
keyof
DB
[
TableName
]
&
string
;
primaryKeyOverride
?:
keyof
DB
[
TableName
]
&
string
|
null
;
primaryKeyValue
:
(
associationInstance
:
Dream
|
null
)
=>
any
;
type
:
"BelongsTo"
;
withoutDefaultScopes
?:
Exclude
<
(
BaseInstance
[
"schema"
]
[
BaseInstance
[
"table"
]
&
keyof
(...)
[
(...)
]
]
[
"scopes"
&
keyof
(
...
)
[
(...)
]
[
(...)
&
(...)
]
]
[
"default"
&
keyof
(...)
[
(...)
]
[
(...)
&
(...)
]
[
"scopes"
&
keyof
(
...
)
]
]
&
string
[]
)
[
number
]
,
"dream:STI"
,
>
[]
;
}
Type Parameters
BaseInstance
extends
Dream
DB
Schema
TableName
extends
AssociationTableNames
<
DB
,
Schema
>
&
keyof
DB
Index
Properties
as
distinct
foreign
Key
foreign
Key
Type
Field
global
Association
Name
Or
Names
model
CB
optional
polymorphic
primary
Key
primary
Key
Override?
primary
Key
Value
type
without
Default
Scopes?
Properties
as
as
:
string
distinct
distinct
:
null
foreign
Key
foreignKey
:
()
=>
keyof
BaseInstance
[
"DB"
]
[
BaseInstance
[
"table"
]
&
keyof
BaseInstance
[
"DB"
]
]
&
string
foreign
Key
Type
Field
foreignKeyTypeField
:
()
=>
keyof
BaseInstance
[
"DB"
]
[
BaseInstance
[
"table"
]
&
keyof
BaseInstance
[
"DB"
]
]
&
string
global
Association
Name
Or
Names
globalAssociationNameOrNames
:
string
[]
model
CB
modelCB
:
()
=>
typeof
Dream
|
typeof
Dream
[]
optional
optional
:
boolean
polymorphic
polymorphic
:
boolean
primary
Key
primaryKey
:
(
associationInstance
?:
Dream
,
opts
?:
{
associatedClassOverride
?:
typeof
Dream
}
,
)
=>
keyof
DB
[
TableName
]
&
string
Optional
primary
Key
Override
primaryKeyOverride
?:
keyof
DB
[
TableName
]
&
string
|
null
primary
Key
Value
primaryKeyValue
:
(
associationInstance
:
Dream
|
null
)
=>
any
type
type
:
"BelongsTo"
Optional
without
Default
Scopes
withoutDefaultScopes
?:
Exclude
<
(
BaseInstance
[
"schema"
]
[
BaseInstance
[
"table"
]
&
keyof
(...)
[
(...)
]
]
[
"scopes"
&
keyof
(
...
)
[
(...)
]
[
(...)
&
(...)
]
]
[
"default"
&
keyof
(...)
[
(...)
]
[
(...)
&
(...)
]
[
"scopes"
&
keyof
(
...
)
]
]
&
string
[]
)
[
number
]
,
"dream:STI"
,
>
[]
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
as
distinct
foreign
Key
foreign
Key
Type
Field
global
Association
Name
Or
Names
model
CB
optional
polymorphic
primary
Key
primary
Key
Override
primary
Key
Value
type
without
Default
Scopes
@rvoh/dream
Loading...