Documentation
Preparing search index...
@saltcorn/data
models/table_constraints
TableConstraint
Class TableConstraint
TableConstraint class
Index
Constructors
constructor
Properties
configuration
id?
table?
table_
id?
type
Accessors
to
Json
type_
options
Methods
delete
create
delete_
field_
constraints
find
find
One
Constructors
constructor
new
TableConstraint
(
o
:
TableConstraintCfg
)
:
TableConstraint
Parameters
o
:
TableConstraintCfg
Returns
TableConstraint
Properties
configuration
configuration
:
any
Optional
id
id
?:
null
|
number
Optional
table
table
?:
Table
Optional
table_
id
table_id
?:
number
type
type
:
"Unique"
|
"Index"
|
"Formula"
Accessors
to
Json
get
toJson
()
:
{
configuration
:
any
;
type
:
"Unique"
|
"Index"
|
"Formula"
}
Returns
{
configuration
:
any
;
type
:
"Unique"
|
"Index"
|
"Formula"
}
Static
type_
options
get
type_options
()
:
(
"Unique"
|
"Index"
|
"Formula"
)
[]
Returns (
"Unique"
|
"Index"
|
"Formula"
)
[]
Methods
delete
delete
()
:
Promise
<
void
>
Returns
Promise
<
void
>
Static
create
create
(
f
:
TableConstraintCfg
)
:
Promise
<
TableConstraint
>
Parameters
f
:
TableConstraintCfg
Returns
Promise
<
TableConstraint
>
Static
delete_
field_
constraints
delete_field_constraints
(
table
:
Table
,
field
:
Field
)
:
Promise
<
void
>
Parameters
table
:
Table
field
:
Field
Returns
Promise
<
void
>
Static
find
find
(
where
:
Where
,
selectopts
?:
SelectOptions
)
:
Promise
<
TableConstraint
[]
>
Parameters
where
:
Where
Optional
selectopts
:
SelectOptions
Returns
Promise
<
TableConstraint
[]
>
Static
find
One
findOne
(
where
:
Where
)
:
Promise
<
null
|
TableConstraint
>
Parameters
where
:
Where
Returns
Promise
<
null
|
TableConstraint
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
configuration
id
table
table_
id
type
Accessors
to
Json
type_
options
Methods
delete
create
delete_
field_
constraints
find
find
One
Documentation
Loading...
TableConstraint class