IExtensionDataManager interface
Yöntemler
| create |
Sağlanan koleksiyonda bir belge oluşturma sözü verir |
| delete |
Sağlanan kapsam, koleksiyon ve kimlikte belgeyi silmek için bir söz döndürür |
| get |
Sağlanan koleksiyonda sağlanan kimliğe sahip bir belge alma taahhüdü döndürür |
| get |
Sağlanan koleksiyondaki tüm belgeleri almak için bir söz verir |
| get |
Sağlanan anahtar ve kapsamda bir ayarı almak için bir söz döndürür |
| query |
Bir koleksiyon kümesini sorgulamak için bir söz döndürür |
| query |
Bir koleksiyon kümesini sorgulamak için bir söz döndürür |
| set |
Sağlanan koleksiyondaki bir belgeyi ayarlamak için bir söz döndürür Yoksa belgeyi oluşturur, aksi takdirde mevcut belgeyi sağlanan kimlikle günceller |
| set |
Sağlanan anahtar ve kapsamda bir ayarı kaydetme sözü verir |
| update |
Sağlanan koleksiyondaki bir belgeyi güncelleştirmek için bir söz döndürür Sağlanan kimliğe sahip bir belge mevcut olmalıdır |
Yöntem Ayrıntıları
createDocument(string, any, IDocumentOptions)
Sağlanan koleksiyonda bir belge oluşturma sözü verir
function createDocument(collectionName: string, doc: any, documentOptions?: IDocumentOptions): Promise<any>
Parametreler
- collectionName
-
string
Belgenin bulunduğu koleksiyonun adı
- doc
-
any
Saklanacak belge
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<any>
deleteDocument(string, string, IDocumentOptions)
Sağlanan kapsam, koleksiyon ve kimlikte belgeyi silmek için bir söz döndürür
function deleteDocument(collectionName: string, id: string, documentOptions?: IDocumentOptions): Promise<void>
Parametreler
- collectionName
-
string
Belgenin bulunduğu koleksiyonun adı
- id
-
string
Koleksiyondaki belgenin kimliği
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<void>
getDocument(string, string, IDocumentOptions)
Sağlanan koleksiyonda sağlanan kimliğe sahip bir belge alma taahhüdü döndürür
function getDocument(collectionName: string, id: string, documentOptions?: IDocumentOptions): Promise<any>
Parametreler
- collectionName
-
string
Belgenin bulunduğu koleksiyonun adı
- id
-
string
Koleksiyondaki belgenin kimliği
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<any>
getDocuments(string, IDocumentOptions)
Sağlanan koleksiyondaki tüm belgeleri almak için bir söz verir
function getDocuments(collectionName: string, documentOptions?: IDocumentOptions): Promise<any[]>
Parametreler
- collectionName
-
string
Belgenin bulunduğu koleksiyonun adı
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<any[]>
getValue<T>(string, IDocumentOptions)
Sağlanan anahtar ve kapsamda bir ayarı almak için bir söz döndürür
function getValue<T>(key: string, documentOptions?: IDocumentOptions): Promise<T>
Parametreler
- key
-
string
Şunun için bir değer almak için anahtar
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<T>
queryCollections(ExtensionDataCollection[])
Bir koleksiyon kümesini sorgulamak için bir söz döndürür
function queryCollections(collections: ExtensionDataCollection[]): Promise<ExtensionDataCollection[]>
Parametreler
- collections
Sorgulanacak koleksiyonların listesi. Her koleksiyon collectionName, scopeType ve scopeValue koleksiyonlarını içerir
Döndürülenler
Promise<ExtensionDataCollection[]>
queryCollectionsByName(string[])
Bir koleksiyon kümesini sorgulamak için bir söz döndürür
function queryCollectionsByName(collectionNames: string[]): Promise<ExtensionDataCollection[]>
Parametreler
- collectionNames
-
string[]
Döndürülenler
Promise<ExtensionDataCollection[]>
setDocument(string, any, IDocumentOptions)
Sağlanan koleksiyondaki bir belgeyi ayarlamak için bir söz döndürür Yoksa belgeyi oluşturur, aksi takdirde mevcut belgeyi sağlanan kimlikle günceller
function setDocument(collectionName: string, doc: any, documentOptions?: IDocumentOptions): Promise<any>
Parametreler
- collectionName
-
string
Belgenin bulunduğu koleksiyonun adı
- doc
-
any
Saklanacak belge
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<any>
setValue<T>(string, T, IDocumentOptions)
Sağlanan anahtar ve kapsamda bir ayarı kaydetme sözü verir
function setValue<T>(key: string, value: T, documentOptions?: IDocumentOptions): Promise<T>
Parametreler
- key
-
string
Şunun için bir değer kaydetmenin anahtarı
- value
-
T
Tasarruf edilecek değer
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<T>
updateDocument(string, any, IDocumentOptions)
Sağlanan koleksiyondaki bir belgeyi güncelleştirmek için bir söz döndürür Sağlanan kimliğe sahip bir belge mevcut olmalıdır
function updateDocument(collectionName: string, doc: any, documentOptions?: IDocumentOptions): Promise<any>
Parametreler
- collectionName
-
string
Belgenin bulunduğu koleksiyonun adı
- doc
-
any
Saklanacak belge
- documentOptions
- IDocumentOptions
Uzantı belge seçenekleri, varsayılan kapsam değeri hesap genelidir
Döndürülenler
Promise<any>