文档首页
X DevAPI 用户指南
下载本手册
PDF (US Ltr) - 1.4Mb
PDF (A4) - 1.4Mb


X DevAPI 用户指南  /  CRUD 操作  /  CRUD 操作概述

3.1 CRUD 操作概述

CRUD 操作作为方法提供,这些方法在模式对象上运行。可用的模式对象包括包含文档的集合对象或包含行和包含文档的集合的表对象。

下表显示了集合和表对象可用的 CRUD 操作。

数据库对象类

图 3.1 数据库对象 - 类图

The DatabaseObject class contains the following general functions: getSession(): XSessionObj, getSchema(): SchemaObj, getName(): String, existsInDatabase(): Boolean|Unknown. The Schema class contains the following functions: getCollections() and getTables() are browse functions. getCollection(): CollectionObj, getTable(): TableObj, and getCollectionAsTable(): TableObj are DbObject instance functions. createCollection() is a create function. The Collection class contains the following functions: add(): CollectionInsertObj, find(): CollectionFindObj, modify(): CollectionUpdateObj, and remove(): CollectionDeleteObj are CRUD functions. createIndex(), dropIndex(), and getIndexes() are index functions. newDoc() and count(): Integer are document and structure functions. The Table class contains the following functions: insert(): InsertObj, select(): SelectObj, update(): UpdateObj, and delete(): DeleteObj are relational SQL CRUD functions. dropIndex() and getIndexes() are index functions. count(): Integer is a general function.