다음을 통해 공유


IExtensionDataManager interface

메서드

createDocument(string, any, IDocumentOptions)

제공된 컬렉션에서 문서를 만들기 위한 약속 반환

deleteDocument(string, string, IDocumentOptions)

제공된 범위, 컬렉션 및 ID에서 문서를 삭제하기 위한 프라미스를 반환합니다.

getDocument(string, string, IDocumentOptions)

제공된 컬렉션에서 제공된 ID를 사용하여 문서를 가져오기 위한 약속 반환

getDocuments(string, IDocumentOptions)

제공된 컬렉션의 모든 문서를 가져오는 것에 대한 프라미스를 반환합니다.

getValue<T>(string, IDocumentOptions)

제공된 키 및 범위에서 설정을 검색하기 위한 프라미스를 반환합니다.

queryCollections(ExtensionDataCollection[])

컬렉션 집합을 쿼리하기 위한 프라미스를 반환합니다.

queryCollectionsByName(string[])

컬렉션 집합을 쿼리하기 위한 프라미스를 반환합니다.

setDocument(string, any, IDocumentOptions)

제공된 컬렉션에서 문서를 설정하겠다는 약속을 반환합니다. 문서가 없으면 문서를 만듭니다. 그렇지 않으면 기존 문서를 제공된 ID로 업데이트합니다.

setValue<T>(string, T, IDocumentOptions)

제공된 키 및 범위에서 설정을 저장하기 위한 프라미스를 반환합니다.

updateDocument(string, any, IDocumentOptions)

제공된 컬렉션에서 문서를 업데이트하기 위한 약속을 반환합니다. 제공된 ID가 있는 문서가 있어야 합니다.

메서드 세부 정보

createDocument(string, any, IDocumentOptions)

제공된 컬렉션에서 문서를 만들기 위한 약속 반환

function createDocument(collectionName: string, doc: any, documentOptions?: IDocumentOptions): Promise<any>

매개 변수

collectionName

string

문서가 있는 컬렉션의 이름입니다.

doc

any

저장할 문서

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<any>

deleteDocument(string, string, IDocumentOptions)

제공된 범위, 컬렉션 및 ID에서 문서를 삭제하기 위한 프라미스를 반환합니다.

function deleteDocument(collectionName: string, id: string, documentOptions?: IDocumentOptions): Promise<void>

매개 변수

collectionName

string

문서가 있는 컬렉션의 이름입니다.

id

string

컬렉션에 있는 문서의 ID입니다.

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<void>

getDocument(string, string, IDocumentOptions)

제공된 컬렉션에서 제공된 ID를 사용하여 문서를 가져오기 위한 약속 반환

function getDocument(collectionName: string, id: string, documentOptions?: IDocumentOptions): Promise<any>

매개 변수

collectionName

string

문서가 있는 컬렉션의 이름입니다.

id

string

컬렉션에 있는 문서의 ID입니다.

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<any>

getDocuments(string, IDocumentOptions)

제공된 컬렉션의 모든 문서를 가져오는 것에 대한 프라미스를 반환합니다.

function getDocuments(collectionName: string, documentOptions?: IDocumentOptions): Promise<any[]>

매개 변수

collectionName

string

문서가 있는 컬렉션의 이름입니다.

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<any[]>

getValue<T>(string, IDocumentOptions)

제공된 키 및 범위에서 설정을 검색하기 위한 프라미스를 반환합니다.

function getValue<T>(key: string, documentOptions?: IDocumentOptions): Promise<T>

매개 변수

key

string

에 대한 값을 검색할 키입니다.

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<T>

queryCollections(ExtensionDataCollection[])

컬렉션 집합을 쿼리하기 위한 프라미스를 반환합니다.

function queryCollections(collections: ExtensionDataCollection[]): Promise<ExtensionDataCollection[]>

매개 변수

collections

ExtensionDataCollection[]

쿼리할 컬렉션 목록입니다. 각 컬렉션에는 collectionName, scopeType 및 scopeValue가 포함됩니다.

반환

queryCollectionsByName(string[])

컬렉션 집합을 쿼리하기 위한 프라미스를 반환합니다.

function queryCollectionsByName(collectionNames: string[]): Promise<ExtensionDataCollection[]>

매개 변수

collectionNames

string[]

반환

setDocument(string, any, IDocumentOptions)

제공된 컬렉션에서 문서를 설정하겠다는 약속을 반환합니다. 문서가 없으면 문서를 만듭니다. 그렇지 않으면 기존 문서를 제공된 ID로 업데이트합니다.

function setDocument(collectionName: string, doc: any, documentOptions?: IDocumentOptions): Promise<any>

매개 변수

collectionName

string

문서가 있는 컬렉션의 이름입니다.

doc

any

저장할 문서

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<any>

setValue<T>(string, T, IDocumentOptions)

제공된 키 및 범위에서 설정을 저장하기 위한 프라미스를 반환합니다.

function setValue<T>(key: string, value: T, documentOptions?: IDocumentOptions): Promise<T>

매개 변수

key

string

값을 저장할 키입니다.

value

T

저장할 값입니다.

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<T>

updateDocument(string, any, IDocumentOptions)

제공된 컬렉션에서 문서를 업데이트하기 위한 약속을 반환합니다. 제공된 ID가 있는 문서가 있어야 합니다.

function updateDocument(collectionName: string, doc: any, documentOptions?: IDocumentOptions): Promise<any>

매개 변수

collectionName

string

문서가 있는 컬렉션의 이름입니다.

doc

any

저장할 문서

documentOptions
IDocumentOptions

확장 문서 옵션, 기본 범위 값은 계정 전체

반환

Promise<any>