import { AxioDBCloud } from './AxioDBCloud.client'; import ReaderProxy from './ReaderProxy'; import UpdateOperationProxy from './UpdateOperationProxy'; import DeleteOperationProxy from './DeleteOperationProxy'; import AggregationProxy from './AggregationProxy'; import TransactionProxy from './TransactionProxy'; /** Mirrors the Collection class API. */ export default class CollectionProxy { private client; private dbName; private collectionName; constructor(client: AxioDBCloud, dbName: string, collectionName: string); insert(data: object): Promise; insertMany(documents: object[]): Promise; findByIds(ids: string[]): Promise; query(query: object): ReaderProxy; update(query: object): UpdateOperationProxy; delete(query: object): DeleteOperationProxy; aggregate(pipeline: object[]): AggregationProxy; totalDocuments(): Promise; newIndex(...fieldNames: string[]): Promise; dropIndex(indexName: string): Promise; listIndexes(): Promise; /** * Begin a transaction on this collection. Returns a TransactionProxy that * pins all operations to a single TCP connection so in-flight writes are * visible to subsequent reads within the same transaction. */ beginTransaction(): Promise; get name(): string; }