File

src/api/fileops/fileset.ts

Description

Fileset object is used for manipulating filesFormDataType> Type of FormData (different for Node and Browser)T> fileset user fieldsD> user + default fieldsF> file type (ArrayBuffer for web, ReadStream for node)

Index

Properties
Methods
Accessors

Constructor

constructor(filesetName: string, clientConfig: literal type, fileUploader: FileUploader, requestExecuter: RequestExecuter)
Parameters :
Name Type Optional
filesetName string No
clientConfig literal type No
fileUploader FileUploader<FormDataType | T | F> No
requestExecuter RequestExecuter No

Methods

Public attach
attach(resourceName: string, filter: IFilteringCriterion> | IFilteringCriterionCallback> | IdentityCollection>)

Creates an Attach query.

Parameters :
Name Type Optional Description
resourceName string No

The name of the resource to be attached.

filter IFilteringCriterion<FilesetInterface<T>> | IFilteringCriterionCallback<FilesetInterface<T>> | IdentityCollection<FilesetInterface<T>> No

Filtering criterion or a callback that returns one, that will be applied to the resource to be attached.

ActionQuery object specialized for attaching resources to the current one.

Public delete
delete()

Creates a Delete query

Query object specialized for delete statements You need to specify a filter to narrow down the records that you want deleted from the backend.

Public detach
detach(resourceName: string, filter: IFilteringCriterion> | IFilteringCriterionCallback> | IdentityCollection>)

Creates a Detach query.

Parameters :
Name Type Optional Description
resourceName string No

The name of the resource to be detached.

filter IFilteringCriterion<FilesetInterface<T>> | IFilteringCriterionCallback<FilesetInterface<T>> | IdentityCollection<FilesetInterface<T>> No

Filtering criterion or a callback that returns one, that will be applied to the resource to be detached.

ActionQuery object specialized for detaching resources from the current one.

Public insert
insert()

insert() does not implemented

Returns : never
Public select
select()

Creates a Select query.

Returns : SelectQuery<D>

Query object specialized for select statements. With no filters set, returns all records in the selected dataset.

Public update
update(data: T)

Creates an Update query.

Parameters :
Name Type Optional Description
data T No

Dictionary that contains the key:value pairs for the fields that you want to modify of this dataset

Returns : UpdateQuery<T>

Query object specialized for update statements. Don't forget to apply a filter to specify the fields that will be modified. TODO update() does not work as in datasets

Public upload
upload(files: Array>)

Upload files and create records in the fileset

Parameters :
Name Type Optional Description
files Array<FilesetMultipart<T, F>> No

list of files with record data

Properties

Public Readonly resourceType
Type : ResourceType
Default value : ResourceType.Fileset

Resource type of the fileset

Accessors

name
getname()

Name of the fileset

Returns : string

result-matching ""

    No results matching ""