DataPlugin.
Classes
DataPlugableClass
Extends PlugableClass.
new DataPlugableClass():
DataPlugableClass
Returns DataPlugableClass. Inherited from PlugableClass.constructor.
| Property | Type |
|---|---|
delete | (args: DeleteQuery, opts: JobOptions) => Promise<DataOrError<Identified[]>> |
functions | FunctionRecord |
insert | <ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<RowTypeFromTable<ARGS>>> |
options | StringRecord |
request | <ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<ResourceInsertResponse>> |
select | <ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<RowTypeFromTable<ARGS>[]>> |
update | <ARGS>(args: ARGS, opts: JobOptions) => Promise<DataOrError<RowTypeFromTable<ARGS>>> |
Methods
install(
definition, …ids):void|Errored
| Parameter | Type | Description |
|---|---|---|
definition | string | Function | StringTuple | |
…ids | string[] |
Returns void | Errored. Inherited from PlugableClass.install.
toString():
string
Returns string. Inherited from PlugableClass.toString.
Interfaces
AssociationQuery
Extends TableDescription.IdsQuery.
| Property | Type | Description |
|---|---|---|
column? | OrArray<string> | columns to select, defaults to ’*‘ |
idColumn? | string | column that ids are in |
ids | OrArray<string> | ids to search for within idColumn |
range? | number[] | - |
sort? | SearchSortOptions[] | - |
table | string | table to search in |
users? | OrArray<string> | ids to search for within user_id column |
ContentRow
Extends Labeled.Typed.Sourced.DataRow. Extended by MediaRow and ResourceRow.
| Property | Type |
|---|---|
created_at | undefined | string |
id | string |
label? | string |
project_id? | string |
source | string |
type | string |
updated_at? | string |
user_id | undefined | string |
Data<T>
Extended by StringData.
| Type Parameter | Default type |
|---|---|
T extends Primitive | Primitive |
| Property | Type |
|---|---|
data | T |
error? | undefined |
DataGetOptions
| Property | Type |
|---|---|
id? | string |
progress? | ServerProgress |
DataListArgs
Extends AssetParams. Extended by DataListOptions.
| Property | Type |
|---|---|
descending? | boolean |
order? | string |
partial? | boolean |
sources? | OrArray<string> |
terms? | OrArray<string> |
types? | OrArray<MediaType> |
DataListOptions
Extends DataListArgs.
| Property | Type |
|---|---|
descending? | boolean |
order? | string |
partial? | boolean |
progress? | ServerProgress |
sources? | OrArray<string> |
terms? | OrArray<string> |
types? | OrArray<MediaType> |
DataPutOptions
| Property | Type |
|---|---|
asset | Media |
progress? | ServerProgress |
DataRow
Extends Identified.Partial<Record<CoreColumn, string>>. Extended by ContentRow.
Indexable
[key: string]: Value | undefined
| Property | Type |
|---|---|
created_at | undefined | string |
id | string |
user_id | undefined | string |
DeleteQuery
| Property | Type | Description |
|---|---|---|
idColumn? | string | column that ids are in |
ids | OrArray<string> | ids to search for within idColumn |
table | string | table to search in |
user_id | string | owner of rows |
IdQuery
Extends Tabled.Identified.
| Property | Type | Description |
|---|---|---|
column? | OrArray<string> | columns to select, defaults to ’*‘ |
id | string | - |
includeShared? | boolean | when true, returned row can include shared |
table | string | table to search in |
IdsQuery
Extended by AssociationQuery and DeleteQuery.
| Property | Type | Description |
|---|---|---|
idColumn? | string | column that ids are in |
ids | OrArray<string> | ids to search for within idColumn |
InsertQuery
Extends Tabled.
| Property | Type | Description |
|---|---|---|
table | string | table to search in |
values | Partial<ValueRecord> | record with columns for keys and unescaped values |
MashMediaRow
| Property | Type |
|---|---|
created_at | string |
id | string |
mash_media_id | string |
media_id | string |
user_id | string |
MediaRow
Extends ContentRow.Partial<Record<MediaColumn, string>>.
| Property | Type |
|---|---|
created_at | undefined | string |
id | string |
label? | string |
project_id? | string |
rest | undefined | string |
source | string |
type | string |
updated_at? | string |
user_id | undefined | string |
NormalizedSearchRequest
| Property | Type |
|---|---|
column | string[] |
range | number[] |
sort | SearchSortOptions[] |
source | string[] |
term | string[] |
type | string[] |
RequestQuery
Extends Tabled.
| Property | Type | Description |
|---|---|---|
id | string | id to retrieve requests for |
table | string | table to search in |
ResourceData
Extends ResourceObject.
| Property | Type |
|---|---|
bytes? | number |
createdAt? | string |
decoded? | UnknownRecord |
id | string |
label? | string |
projectId? | string |
request | EndpointObject |
source | string |
type | ResourceType |
updatedAt? | string |
uploadedAt? | string |
ResourceRow
Extends ContentRow.Partial<Record<ResourceColumn, string>>.
| Property | Type |
|---|---|
bytes | undefined | string |
created_at | undefined | string |
endpoint | undefined | string |
id | string |
label? | string |
project_id? | string |
rest | undefined | string |
source | string |
type | string |
updated_at? | string |
uploaded_at | undefined | string |
user_id | undefined | string |
ResourceSearchExtendedResponse
| Property | Type |
|---|---|
caching? | Caching |
data | StoredResource[] |
ResourceSearchRequest
Extends SearchRequest.
| Property | Type |
|---|---|
column? | OrArray<string> |
range? | OrArray<number> |
sort? | OrArray<SearchSort> |
source? | OrArray<string> |
term? | OrArray<string> |
type? | OrArray<MediaType> |
SearchRequest
Extended by MediaSearchRequest and ResourceSearchRequest.
| Property | Type |
|---|---|
column? | OrArray<string> |
range? | OrArray<number> |
sort? | OrArray<SearchSort> |
source? | OrArray<string> |
term? | OrArray<string> |
type? | OrArray<MediaType> |
SearchSortOptions
| Property | Type |
|---|---|
descending? | boolean |
property | string |
SelectQuery
Extends TableDescription.
| Property | Type | Description |
|---|---|---|
column? | OrArray<string> | columns to select, defaults to ’*‘ |
includeShared? | boolean | when true, returned data includes shared rows |
query | Record<string, OrArray<string>> | record with columns for keys and unescaped values |
range? | number[] | - |
sort? | SearchSortOptions[] | - |
table | string | table to search in |
StringData
Extends Data<string>.
| Property | Type |
|---|---|
data | string |
error? | undefined |
TableDescription
Extends Tabled. Extended by SelectQuery and AssociationQuery.
| Property | Type | Description |
|---|---|---|
column? | OrArray<string> | columns to select, defaults to ’*‘ |
range? | number[] | - |
sort? | SearchSortOptions[] | - |
table | string | table to search in |
Tabled
Extended by TableDescription, IdQuery, DeleteQuery, RequestQuery, InsertQuery, and UpdateQuery.
| Property | Type | Description |
|---|---|---|
table | string | table to search in |
UpdateQuery
Extends Tabled.
| Property | Type | Description |
|---|---|---|
table | string | table to search in |
values | Partial<ValueRecord> | record with columns for keys and unescaped values |
VideoData
Extends StoredMedia.VideoProperties.
| Property | Type |
|---|---|
createdAt? | string |
id | string |
label? | string |
projectId? | string |
resources? | StoredResource[] |
source | string |
type | MediaType |
updatedAt? | string |
Type Aliases
CoreColumn
CoreColumn:
"created_at"|"user_id"
DataOrError<T>
| Type Parameter | Default type |
|---|---|
T extends Primitive | Primitive |
DataType
DataType:
string|ScalarType
MediaColumn
MediaColumn:
"rest"
ResourceColumn
ResourceColumn:
"bytes"|"endpoint"|"uploaded_at"|"rest"
ResourceSearchResponse
ResourceSearchResponse:
StoredResource[] |ResourceSearchExtendedResponse
RowTypeFromTable<T>
RowTypeFromTable<
T>:T["table"] extends_media?MediaRow:T["table"] extends_resources?ResourceRow:T["table"] extends_media_resources?MediaResourcesRow:T["table"] extends_mash_media?MashMediaRow:DataRow
| Type Parameter | Default type |
|---|---|
T extends Tabled | Tabled |
SearchSort
SearchSort:
string|SearchSortOptions
Variables
DataPlugin
constDataPlugin:DataPlugableClass
Functions
assertData
assertData<
T>(value):asserts value is Data<T>
| Type Parameter | Description |
|---|---|
T extends Primitive |
| Parameter | Type | Description |
|---|---|---|
value | any |
Returns asserts value is Data<T>.
assertDatasetElement
assertDatasetElement(
value,name?): asserts value is HTMLElement | SVGElement
| Parameter | Type | Description |
|---|---|---|
value | any | |
name? | string |
Returns asserts value is HTMLElement | SVGElement.
deleteSqliteDataPlug
deleteSqliteDataPlug(
deleteQuery,opts?):Promise<DataOrError<Identified[]>>
| Parameter | Type |
|---|---|
deleteQuery | DeleteQuery |
opts? | JobOptions |
Returns Promise<DataOrError<Identified[]>>.
dragData
dragData(
dataTransfer?,type?):object
| Parameter | Type |
|---|---|
dataTransfer? | DataTransfer |
type? | `${string}/x-masher` |
Returns object.
insertSqliteDataPlug
insertSqliteDataPlug<
ARGS>(args,opts?):Promise<DataOrError<RowTypeFromTable<ARGS>>>
| Type Parameter | Description |
|---|---|
ARGS extends InsertQuery |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<RowTypeFromTable<ARGS>>>.
isData
isData<
T>(value):value is Data<T>
| Type Parameter |
|---|
T extends Primitive |
| Parameter | Type |
|---|---|
value | any |
Returns value is Data<T>.
isDatasetElement
isDatasetElement(
value): value is HTMLElement | SVGElement
| Parameter | Type |
|---|---|
value | any |
Returns value is HTMLElement | SVGElement.
isResourceData
isResourceData(
value):value is ResourceData
| Parameter | Type |
|---|---|
value | any |
Returns value is ResourceData.
mediaSearchKey
mediaSearchKey(
params):string
| Parameter | Type |
|---|---|
params | MediaSearchRequest |
Returns string.
normalizeColumns
normalizeColumns(
columns,orUndefined?):string[]
| Parameter | Type |
|---|---|
columns | string[] |
orUndefined? | boolean |
Returns string[].
normalizedMediaSearch
normalizedMediaSearch(
args):DataOrError<NormalizedSearchRequest>
| Parameter | Type |
|---|---|
args | MediaSearchRequest |
Returns DataOrError<NormalizedSearchRequest>.
normalizedResourceSearch
normalizedResourceSearch(
args):DataOrError<NormalizedSearchRequest>
| Parameter | Type |
|---|---|
args | ResourceSearchRequest |
Returns DataOrError<NormalizedSearchRequest>.
normalizedSearch
normalizedSearch(
args):DataOrError<NormalizedSearchRequest>
| Parameter | Type |
|---|---|
args | SearchRequest |
Returns DataOrError<NormalizedSearchRequest>.
queryDeleteMedia
queryDeleteMedia<
ARGS>(args,opts?):Promise<DataOrError<IfArray<ARGS,Identified>>>
| Type Parameter | Description |
|---|---|
ARGS extends OrArray<Identified> |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.
queryDeleteResource
queryDeleteResource<
ARGS>(args,opts?):Promise<DataOrError<IfArray<ARGS,Identified>>>
| Type Parameter | Description |
|---|---|
ARGS extends OrArray<Identified> |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.
queryInsertMedia
queryInsertMedia<
ARGS>(args,opts?):Promise<DataOrError<IfArray<ARGS,Identified>>>
| Type Parameter | Description |
|---|---|
ARGS extends OrArray<StorableMedia> |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.
queryInsertResource
queryInsertResource<
ARGS>(args,opts?):Promise<DataOrError<IfArray<ARGS,ResourceInsertResponse>>>
| Type Parameter | Description |
|---|---|
ARGS extends OrArray<StorableResource> |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<IfArray<ARGS, ResourceInsertResponse>>>.
queryRowMedia
queryRowMedia(
args,opts?):Promise<DataOrError<StoredMedia>>
| Parameter | Type | Description |
|---|---|---|
args | Identified | |
opts? | JobOptions |
Returns Promise<DataOrError<StoredMedia>>.
queryRowResource
queryRowResource(
args,opts?):Promise<DataOrError<StoredResource>>
| Parameter | Type | Description |
|---|---|---|
args | Identified | |
opts? | JobOptions |
Returns Promise<DataOrError<StoredResource>>.
querySelectMedia
querySelectMedia(
args,opts?):Promise<DataOrError<MediaSearchResponse>>
| Parameter | Type | Description |
|---|---|---|
args | MediaSearchRequest | |
opts? | JobOptions |
Returns Promise<DataOrError<MediaSearchResponse>>.
querySelectResource
querySelectResource(
args,opts?):Promise<DataOrError<ResourceSearchResponse>>
| Parameter | Type | Description |
|---|---|---|
args | ResourceSearchRequest | |
opts? | JobOptions |
Returns Promise<DataOrError<ResourceSearchResponse>>.
queryUpdateMedia
queryUpdateMedia<
ARGS>(args,opts?):Promise<DataOrError<IfArray<ARGS,Identified>>>
| Type Parameter | Description |
|---|---|
ARGS extends OrArray<StoredMedia> |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<IfArray<ARGS, Identified>>>.
queryUpdateResource
queryUpdateResource<
ARGS>(args,opts?):Promise<DataOrError<IfArray<ARGS,StoredResource>>>
| Type Parameter | Description |
|---|---|
ARGS extends OrArray<StoredResource> |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<IfArray<ARGS, StoredResource>>>.
requestSqliteDataPlug
requestSqliteDataPlug<
ARGS>(args,opts):Promise<DataOrError<ResourceInsertResponse>>
| Type Parameter |
|---|
ARGS extends StoredResource |
| Parameter | Type |
|---|---|
args | ARGS |
opts | JobOptions |
Returns Promise<DataOrError<ResourceInsertResponse>>.
selectSqliteDataPlug
selectSqliteDataPlug<
ARGS>(args,opts):Promise<DataOrError<RowTypeFromTable<ARGS>[]>>
| Type Parameter |
|---|
ARGS extends SelectQuery |
| Parameter | Type |
|---|---|
args | ARGS |
opts | JobOptions |
Returns Promise<DataOrError<RowTypeFromTable<ARGS>[]>>.
setTransferData
setTransferData(
dataTransfer,type,data):void
| Parameter | Type |
|---|---|
dataTransfer | DataTransfer |
type | string |
data | any |
Returns void.
unnormalizeColumns
unnormalizeColumns(
columns,orUndefined?):string[]
| Parameter | Type |
|---|---|
columns | string[] |
orUndefined? | boolean |
Returns string[].
updateSqliteDataPlug
updateSqliteDataPlug<
ARGS>(args,opts?):Promise<DataOrError<RowTypeFromTable<ARGS>>>
| Type Parameter | Description |
|---|---|
ARGS extends UpdateQuery |
| Parameter | Type | Description |
|---|---|---|
args | ARGS | |
opts? | JobOptions |
Returns Promise<DataOrError<RowTypeFromTable<ARGS>>>.