Spec-Zone.ru › MySQL Connectors 1.0

3.1 Обзор операций CRUD

Операции CRUD доступны в виде методов, которые работают с объектами Schema. Доступные объекты Schema состоят из объектов Collection, содержащих Documents, или объектов Table, состоящих из строк и коллекций, содержащих Documents.

Следующая таблица показывает доступные операции CRUD для объектов Collection и Table.

Операция

Документ

Реляционная таблица

Создание

Раздел 4.3.1, “Collection.add()”

Table.insert()

Чтение

Раздел 4.3.2, “Collection.find()”

Table.select()

Обновление

Раздел 4.3.3, “Collection.modify()”

Table.update()

Удаление

Раздел 4.3.4, “Collection.remove()”

Table.delete()

Классы объектов базы данных

Рисунок 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.

© 2025 Oracle
Licensed under the GPLv2 License.
https://docs.oracle.com/cd/E17952_01/x-devapi-userguide-en/crud-operations-overview.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API