sqlkit
Preparing search index...
Repository
Class Repository<T>
Type Parameters
T
Index
Constructors
constructor
Properties
executor
options?
table
Name
Methods
count
delete
find
Row
find
Rows
insert
Many
insert
One
paginate
update
Constructors
constructor
new
Repository
<
T
>
(
tableName
:
string
,
executor
:
SqlExecutor
,
options
?:
RepositoryOptions
,
)
:
Repository
<
T
>
Type Parameters
T
Parameters
tableName
:
string
executor
:
SqlExecutor
Optional
options
:
RepositoryOptions
Returns
Repository
<
T
>
Properties
Protected
Readonly
executor
executor
:
SqlExecutor
Protected
Optional
options
options
?:
RepositoryOptions
Protected
Readonly
table
Name
tableName
:
string
Methods
count
count
(
where
:
WhereCondition
<
T
>
)
:
Promise
<
number
>
Parameters
where
:
WhereCondition
<
T
>
Returns
Promise
<
number
>
delete
delete
(
arg
:
{
returning
?:
(
keyof
T
)
[]
;
where
:
WhereCondition
<
T
>
}
)
:
Promise
<
T
>
Parameters
arg
:
{
returning
?:
(
keyof
T
)
[]
;
where
:
WhereCondition
<
T
>
}
Returns
Promise
<
T
>
find
Row
findRow
(
where
:
WhereCondition
<
T
>
)
:
Promise
<
T
>
Parameters
where
:
WhereCondition
<
T
>
Returns
Promise
<
T
>
find
Rows
findRows
(
payload
?:
QueryRowsPayload
<
T
>
)
:
Promise
<
T
[]
>
Parameters
Optional
payload
:
QueryRowsPayload
<
T
>
Returns
Promise
<
T
[]
>
insert
Many
insertMany
(
data
:
Partial
<
T
>
[]
,
returning
?:
(
keyof
T
)
[]
)
:
Promise
<
T
[]
>
Parameters
data
:
Partial
<
T
>
[]
returning
: (
keyof
T
)
[]
= ...
Returns
Promise
<
T
[]
>
insert
One
insertOne
(
data
:
Partial
<
T
>
,
returning
?:
(
keyof
T
)
[]
)
:
Promise
<
T
>
Parameters
data
:
Partial
<
T
>
returning
: (
keyof
T
)
[]
= ...
Returns
Promise
<
T
>
paginate
paginate
(
options
:
PaginationOptions
<
T
>
)
:
Promise
<
PaginatedResult
<
T
>
>
Paginate the result of a query
Parameters
options
:
PaginationOptions
<
T
>
Returns
Promise
<
PaginatedResult
<
T
>
>
update
update
(
args
:
{
data
:
Partial
<
T
>
;
returning
?:
(
keyof
T
)
[]
;
where
:
WhereCondition
<
T
>
;
}
,
)
:
Promise
<
T
>
Parameters
args
:
{
data
:
Partial
<
T
>
;
returning
?:
(
keyof
T
)
[]
;
where
:
WhereCondition
<
T
>
}
Returns
Promise
<
T
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
executor
options
table
Name
Methods
count
delete
find
Row
find
Rows
insert
Many
insert
One
paginate
update
sqlkit
Loading...
Paginate the result of a query