| Modifier and Type | Field and Description |
|---|---|
| private MysqlxSession | |
| private String | |
| private SchemaImpl | |
| private XMessageBuilder |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public AddStatement | add(Map<String, ?>
map of key-value parameters representing the document fields doc)Implements com. Add a document in the form of a Map. |
| public AddStatement | add(String...
one or more documents given as JSON strings jsonString)Implements com. Add one or more documents. |
| public AddStatement | add(DbDoc doc)
Implements com. Add a document in the form of a DbDoc. |
| public AddStatement | add(DbDoc...
one or more documents given as docs)DbDocImplements com. Add a sequence of documents. |
| public Result | addOrReplaceOne(String
the document id of the document to be replaced id, DbDoc the new document, which may contain expressions. If doc contains an _id value and it does not match the given id then the error
will be thrown. doc)Implements com. Adds the document to the collection. |
| public Result | addOrReplaceOne(String
the document id of the document to be replaced id, String the new document, given as JSON string, which may contain expressions. If doc contains an _id value and it does not match the given id then
the error will be thrown. jsonString)Implements com. Adds the document to the collection. |
| public long | count()
Implements com. Query the number of documents in this collection. |
| public Result | createIndex(String
index name indexName, DbDoc JSON document with the following fields:
indexDefinition)
Implements com. Create a new statement defining the creation of an index on this collection. |
| public Result | createIndex(String
index name indexName, String JSON document with the following fields:
jsonIndexDefinition)
Implements com. Create a new statement defining the creation of an index on this collection. |
| public void | dropIndex(String
index name indexName)Implements com. Create a new statement defining the removal of an index on this collection. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public DatabaseObject. | existsInDatabase()
Implements com. Query the existence of this database object. |
| public FindStatement | find()
Implements com. Create a new find statement retrieving all documents in the collection. |
| public FindStatement | find(String
condition expression searchCondition)Implements com. Create a new find statement retrieving documents matching the given search condition. |
| public String | getName()
Implements com. Retrieve the name of the database object represented by the Java object. |
| public DbDoc | getOne(String
the document id of the document to be retrieved id)Implements com. Return the document with the given id. |
| public Schema | getSchema()
Implements com. Retrieve the schema owning this database object. |
| public Session | getSession()
Implements com. Retrieve the session owning the given schema object. |
| public int | |
| public ModifyStatement | modify(String
condition expression searchCondition)Implements com. Create a new modify statement affecting documents matching the given search condition. |
| public DbDoc | |
| public RemoveStatement | remove(String
condition expression searchCondition)Implements com. Create a new removal statement affecting documents matching the given search condition. |
| public Result | removeOne(String
the document id of the document to be removed id)Implements com. Removes the document with the given id. |
| public Result | replaceOne(String
the document id of the document to be replaced id, DbDoc the new document, which may contain expressions. If document contains an _id value, it is ignored. doc)Implements com. Takes in a document object that will replace the matching document. |
| public Result | replaceOne(String
the document id of the document to be replaced id, String the new document, given as JSON string, which may contain expressions. If document contains an _id value, it is ignored. jsonString)Implements com. Takes in a document object that will replace the matching document. |
| public String |
| mysqlxSession | back to summary |
|---|---|
| private MysqlxSession mysqlxSession | |
| name | back to summary |
|---|---|
| private String name | |
| schema | back to summary |
|---|---|
| private SchemaImpl schema | |
| xbuilder | back to summary |
|---|---|
| private XMessageBuilder xbuilder | |
| CollectionImpl | back to summary |
|---|---|
| pack-priv CollectionImpl(MysqlxSession mysqlxSession, SchemaImpl schema, String name) | |
| add | back to summary |
|---|---|
| public AddStatement add(Map<String, ?> doc) Implements com. Doc from com. Add a document in the form of a Map.
| |
| add | back to summary |
|---|---|
| public AddStatement add(String... jsonString) Implements com. Doc from com. Add one or more documents.
| |
| add | back to summary |
|---|---|
| public AddStatement add(DbDoc doc) Implements com. Doc from com. Add a document in the form of a DbDoc.
| |
| add | back to summary |
|---|---|
| public AddStatement add(DbDoc... docs) Implements com. Doc from com. Add a sequence of documents.
| |
| addOrReplaceOne | back to summary |
|---|---|
| public Result addOrReplaceOne(String id, DbDoc doc) Implements com. Doc from com. Adds the document to the collection. The following algorithm applies:
| |
| addOrReplaceOne | back to summary |
|---|---|
| public Result addOrReplaceOne(String id, String jsonString) Implements com. Doc from com. Adds the document to the collection. The following algorithm applies:
| |
| count | back to summary |
|---|---|
| public long count() Implements com. Doc from com. Query the number of documents in this collection.
| |
| createIndex | back to summary |
|---|---|
| public Result createIndex(String indexName, DbDoc indexDefinition) Implements com. Doc from com. Create a new statement defining the creation of an index on this collection. Example: collection.createIndex("myIndex", "{\"fields\": [{\"field\": \"$.myGeoJsonField\", \"type\": \"GEOJSON\", \"required\": true, \"options\": 2, \"srid\": 4326}], \"type\":\"SPATIAL\"}");
| |
| createIndex | back to summary |
|---|---|
| public Result createIndex(String indexName, String jsonIndexDefinition) Implements com. Doc from com. Create a new statement defining the creation of an index on this collection. Example: collection.createIndex("myIndex", "{\"fields\": [{\"field\": \"$.myGeoJsonField\", \"type\": \"GEOJSON\", \"required\": true, \"options\": 2, \"srid\": 4326}], \"type\":\"SPATIAL\"}");
| |
| dropIndex | back to summary |
|---|---|
| public void dropIndex(String indexName) Implements com. Doc from com. Create a new statement defining the removal of an index on this collection. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| existsInDatabase | back to summary |
|---|---|
| public DatabaseObject. Implements com. Doc from com. Query the existence of this database object.
| |
| find | back to summary |
|---|---|
| public FindStatement find() Implements com. Doc from com. Create a new find statement retrieving all documents in the collection.
| |
| find | back to summary |
|---|---|
| public FindStatement find(String searchCondition) Implements com. Doc from com. Create a new find statement retrieving documents matching the given search condition.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements com. Doc from com. Retrieve the name of the database object represented by the Java object. | |
| getOne | back to summary |
|---|---|
| public DbDoc getOne(String id) Implements com. Doc from com. Return the document with the given id. | |
| getSchema | back to summary |
|---|---|
| public Schema getSchema() Implements com. Doc from com. Retrieve the schema owning this database object. | |
| getSession | back to summary |
|---|---|
| public Session getSession() Implements com. Doc from com. Retrieve the session owning the given schema object. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| modify | back to summary |
|---|---|
| public ModifyStatement modify(String searchCondition) Implements com. Doc from com. Create a new modify statement affecting documents matching the given search condition.
| |
| newDoc | back to summary |
|---|---|
| public DbDoc newDoc() Implements com. Doc from com. Create a new document. | |
| remove | back to summary |
|---|---|
| public RemoveStatement remove(String searchCondition) Implements com. Doc from com. Create a new removal statement affecting documents matching the given search condition.
| |
| removeOne | back to summary |
|---|---|
| public Result removeOne(String id) Implements com. Doc from com. Removes the document with the given id. | |
| replaceOne | back to summary |
|---|---|
| public Result replaceOne(String id, DbDoc doc) Implements com. Doc from com. Takes in a document object that will replace the matching document. If no matches are found, the function returns normally with no changes being made. | |
| replaceOne | back to summary |
|---|---|
| public Result replaceOne(String id, String jsonString) Implements com. Doc from com. Takes in a document object that will replace the matching document. If no matches are found, the function returns normally with no changes being made.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |