feat: Cloudformation + RDS
This commit is contained in:
@@ -23,6 +23,12 @@ export interface CollectionPage<T> {
|
||||
* round-trip a cursor to a different resource or collection.
|
||||
*/
|
||||
nextCursor: string | null
|
||||
/** Provider-reported result count for this page. */
|
||||
count?: number
|
||||
/** Provider-reported number of records examined before filtering. */
|
||||
scannedCount?: number
|
||||
/** Provider-reported capacity consumed by this request. */
|
||||
consumedCapacity?: number
|
||||
}
|
||||
|
||||
export interface PageQuery {
|
||||
@@ -30,6 +36,8 @@ export interface PageQuery {
|
||||
limit?: number
|
||||
}
|
||||
|
||||
export type ItemQuery = string | Record<string, unknown>
|
||||
|
||||
/** The middle level: a log stream, a Cosmos container, a BigQuery table. */
|
||||
export interface ChildCollection {
|
||||
id: string
|
||||
@@ -61,7 +69,7 @@ export interface DocumentStoreAdapter {
|
||||
getItem?(resourceId: string, collectionId: string, itemId: string): Promise<ChildItem | null>
|
||||
putItem?(resourceId: string, collectionId: string, body: Record<string, unknown>): Promise<ChildItem>
|
||||
deleteItem?(resourceId: string, collectionId: string, itemId: string, partitionKey?: string | null): Promise<void>
|
||||
queryItems?(resourceId: string, collectionId: string, query: string): Promise<CollectionPage<ChildItem>>
|
||||
queryItems?(resourceId: string, collectionId: string, query: ItemQuery, page?: PageQuery): Promise<CollectionPage<ChildItem>>
|
||||
}
|
||||
|
||||
/** Flat store: the resource is the collection. */
|
||||
@@ -70,7 +78,7 @@ export interface ItemStoreAdapter {
|
||||
getItem?(resourceId: string, itemId: string): Promise<ChildItem | null>
|
||||
putItem?(resourceId: string, body: Record<string, unknown>): Promise<ChildItem>
|
||||
deleteItem?(resourceId: string, itemId: string, partitionKey?: string | null): Promise<void>
|
||||
queryItems?(resourceId: string, query: string): Promise<CollectionPage<ChildItem>>
|
||||
queryItems?(resourceId: string, query: ItemQuery, page?: PageQuery): Promise<CollectionPage<ChildItem>>
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user