文件首頁
X DevAPI 使用者指南
下載本手冊
PDF (美式信紙) - 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.