类 SchemaImpl
- java.lang.Object
-
- com.mysql.cj.xdevapi.SchemaImpl
-
- 所有已实现的接口:
DatabaseObject,Schema
public class SchemaImpl extends Object implements Schema
Schemaimplementation.
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 com.mysql.cj.xdevapi.DatabaseObject
DatabaseObject.DbObjectStatus, DatabaseObject.DbObjectType
-
从接口继承的嵌套类/接口 com.mysql.cj.xdevapi.Schema
Schema.CreateCollectionOptions, Schema.ModifyCollectionOptions, Schema.Validation
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CollectioncreateCollection(String collectionName)Create a new collection.CollectioncreateCollection(String collectionName, boolean reuseExisting)Create a new collection if it does not already exist on the server.CollectioncreateCollection(String collectionName, Schema.CreateCollectionOptions options)Create a new collection.voiddropCollection(String collectionName)Drop the collection from this schema.booleanequals(Object other)DatabaseObject.DbObjectStatusexistsInDatabase()Query the existence of this database object.CollectiongetCollection(String collectionName)Retrieve a reference to the named collection.CollectiongetCollection(String collectionName, boolean requireExists)Retrieve a reference to the named collection hinting that an exception should be thrown if the collection is not known to the server.TablegetCollectionAsTable(String collectionName)Retrieve a reference to the named collection using the table API.List<Collection>getCollections()Retrieve the set of collections existing in this schema.List<Collection>getCollections(String pattern)Retrieve the set of collections existing in this schema and matching the given pattern.StringgetName()Retrieve the name of the database object represented by the Java object.SchemagetSchema()Retrieve the schema owning this database object.SessiongetSession()Retrieve the session owning the given schema object.TablegetTable(String tableName)Retrieve a reference to the named table.TablegetTable(String tableName, boolean requireExists)Retrieve a reference to the named table hinting that an exception should be thrown if the collection is not known to the server.List<Table>getTables()Retrieve the set of tables existing in this schema.List<Table>getTables(String pattern)Retrieve the set of tables existing in this schema and matching the given pattern.inthashCode()voidmodifyCollection(String collectionName, Schema.ModifyCollectionOptions options)Modify the schema validation of a collection.StringtoString()
-
-
-
方法详细资料
-
getSession
public Session getSession()
从接口复制的说明:DatabaseObjectRetrieve the session owning the given schema object.- 指定者:
getSession在接口中DatabaseObject- 返回:
Session
-
getSchema
public Schema getSchema()
从接口复制的说明:DatabaseObjectRetrieve the schema owning this database object.- 指定者:
getSchema在接口中DatabaseObject- 返回:
Schema
-
getName
public String getName()
从接口复制的说明:DatabaseObjectRetrieve the name of the database object represented by the Java object.- 指定者:
getName在接口中DatabaseObject- 返回:
- name
-
existsInDatabase
public DatabaseObject.DbObjectStatus existsInDatabase()
从接口复制的说明:DatabaseObjectQuery the existence of this database object.- 指定者:
existsInDatabase在接口中DatabaseObject- 返回:
DatabaseObject.DbObjectStatus
-
getCollections
public List<Collection> getCollections()
从接口复制的说明:SchemaRetrieve the set of collections existing in this schema.- 指定者:
getCollections在接口中Schema- 返回:
- list of
Collectionobjects
-
getCollections
public List<Collection> getCollections(String pattern)
从接口复制的说明:SchemaRetrieve the set of collections existing in this schema and matching the given pattern.- 指定者:
getCollections在接口中Schema- 参数:
pattern- match pattern- 返回:
- list of
Collectionobjects
-
getTables
public List<Table> getTables()
从接口复制的说明:SchemaRetrieve the set of tables existing in this schema.
-
getTables
public List<Table> getTables(String pattern)
从接口复制的说明:SchemaRetrieve the set of tables existing in this schema and matching the given pattern.
-
getCollection
public Collection getCollection(String collectionName)
从接口复制的说明:SchemaRetrieve a reference to the named collection.- 指定者:
getCollection在接口中Schema- 参数:
collectionName- collection name- 返回:
Collection
-
getCollection
public Collection getCollection(String collectionName, boolean requireExists)
从接口复制的说明:SchemaRetrieve a reference to the named collection hinting that an exception should be thrown if the collection is not known to the server.- 指定者:
getCollection在接口中Schema- 参数:
collectionName- collection namerequireExists- true if required to exist- 返回:
Collection
-
getCollectionAsTable
public Table getCollectionAsTable(String collectionName)
从接口复制的说明:SchemaRetrieve a reference to the named collection using the table API.- 指定者:
getCollectionAsTable在接口中Schema- 参数:
collectionName- collection name- 返回:
Table
-
getTable
public Table getTable(String tableName)
从接口复制的说明:SchemaRetrieve a reference to the named table.
-
getTable
public Table getTable(String tableName, boolean requireExists)
从接口复制的说明:SchemaRetrieve a reference to the named table hinting that an exception should be thrown if the collection is not known to the server.
-
createCollection
public Collection createCollection(String collectionName)
从接口复制的说明:SchemaCreate a new collection.- 指定者:
createCollection在接口中Schema- 参数:
collectionName- collection name- 返回:
Collection
-
createCollection
public Collection createCollection(String collectionName, boolean reuseExisting)
从接口复制的说明:SchemaCreate a new collection if it does not already exist on the server.- 指定者:
createCollection在接口中Schema- 参数:
collectionName- collection namereuseExisting- true if allowed to reuse- 返回:
Collection
-
createCollection
public Collection createCollection(String collectionName, Schema.CreateCollectionOptions options)
从接口复制的说明:SchemaCreate a new collection.- 指定者:
createCollection在接口中Schema- 参数:
collectionName- collection nameoptions- reuseExisting, validation level and JSON schema options- 返回:
Collection
-
modifyCollection
public void modifyCollection(String collectionName, Schema.ModifyCollectionOptions options)
从接口复制的说明:SchemaModify the schema validation of a collection.- 指定者:
modifyCollection在接口中Schema- 参数:
collectionName- collection nameoptions- validation level and JSON schema options
-
dropCollection
public void dropCollection(String collectionName)
从接口复制的说明:SchemaDrop the collection from this schema.- 指定者:
dropCollection在接口中Schema- 参数:
collectionName- name of collection to drop
-
-