类 XMessageBuilder
- java.lang.Object
-
- com.mysql.cj.protocol.x.XMessageBuilder
-
- 所有已实现的接口:
MessageBuilder<XMessage>
public class XMessageBuilder extends Object implements MessageBuilder<XMessage>
-
-
构造器概要
构造器 构造器 说明 XMessageBuilder()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 XMessagebuildCapabilitiesGet()XMessagebuildCapabilitiesSet(Map<String,Object> keyValuePair)XMessagebuildClose()XMessagebuildComQuery(XMessage sharedPacket, Session sess, PreparedQuery preparedQuery, QueryBindings bindings, String characterEncoding)XMessagebuildCreateCollection(String schemaName, String collectionName)XMessagebuildCreateCollection(String schemaName, String collectionName, Schema.CreateCollectionOptions options)XMessagebuildCreateCollectionIndex(String schemaName, String collectionName, CreateIndexParams params)XMessagebuildDelete(FilterParams filterParams)Build anXMessagefor a non-prepared delete operation.XMessagebuildDisableNotices(String... notices)XMessagebuildDocInsert(String schemaName, String collectionName, List<String> json, boolean upsert)Build anXMessagefor a non-prepared doc insert operation.XMessagebuildDocUpdate(FilterParams filterParams, List<UpdateSpec> updates)Build anXMessagefor a non-prepared doc update operation.XMessagebuildDropCollection(String schemaName, String collectionName)XMessagebuildDropCollectionIndex(String schemaName, String collectionName, String indexName)XMessagebuildEnableNotices(String... notices)XMessagebuildExpectOpen()XMessagebuildExternalAuthStart(String database)XMessagebuildFind(FilterParams filterParams)Build anXMessagefor a non-prepared find operation.XMessagebuildListNotices()List the notices the server allows subscribing to.XMessagebuildListObjects(String schemaName, String pattern)List the objects in the given schema.XMessagebuildModifyCollectionOptions(String schemaName, String collectionName, Schema.ModifyCollectionOptions options)XMessagebuildMysql41AuthContinue(String user, String password, byte[] salt, String database)XMessagebuildMysql41AuthStart()XMessagebuildPlainAuthStart(String user, String password, String database)XMessagebuildPrepareDeallocate(int preparedStatementId)Build anXMessagefor deallocating a prepared statement.XMessagebuildPrepareDelete(int preparedStatementId, FilterParams filterParams)Build anXMessagefor a prepared delete operation.XMessagebuildPrepareDocUpdate(int preparedStatementId, FilterParams filterParams, List<UpdateSpec> updates)Build anXMessagefor a prepared doc update operation.XMessagebuildPrepareExecute(int preparedStatementId, FilterParams filterParams)Build anXMessagefor executing a prepared statement with the given filters.XMessagebuildPrepareFind(int preparedStatementId, FilterParams filterParams)Build anXMessagefor a prepared find operation.XMessagebuildPrepareRowUpdate(int preparedStatementId, FilterParams filterParams, UpdateParams updateParams)Build anXMessagefor a prepared row update operation.XMessagebuildPrepareSqlStatement(int preparedStatementId, String statement)Build a Prepare message for a SQL statement.XMessagebuildRowInsert(String schemaName, String tableName, InsertParams insertParams)Build anXMessagefor a non-prepared row insert operation.XMessagebuildRowUpdate(FilterParams filterParams, UpdateParams updateParams)Build anXMessagefor a non-prepared row update operation.XMessagebuildSessionResetAndClose()XMessagebuildSessionResetKeepOpen()XMessagebuildSha256MemoryAuthContinue(String user, String password, byte[] nonce, String database)XMessagebuildSha256MemoryAuthStart()XMessagebuildSqlStatement(String statement)Build a StmtExecute message for a SQL statement.XMessagebuildSqlStatement(String statement, List<Object> args)Build a StmtExecute message for a SQL statement.
-
-
-
方法详细资料
-
buildCapabilitiesGet
public XMessage buildCapabilitiesGet()
-
buildDocInsert
public XMessage buildDocInsert(String schemaName, String collectionName, List<String> json, boolean upsert)
Build anXMessagefor a non-prepared doc insert operation.- 参数:
schemaName- the schema namecollectionName- the collection namejson- the documents to insertupsert- Whether this is an upsert operation or not- 返回:
- an
XMessageinstance
-
buildRowInsert
public XMessage buildRowInsert(String schemaName, String tableName, InsertParams insertParams)
Build anXMessagefor a non-prepared row insert operation.- 参数:
schemaName- the schema nametableName- the table nameinsertParams- the parameters to insert- 返回:
- an
XMessageinstance
-
buildDocUpdate
public XMessage buildDocUpdate(FilterParams filterParams, List<UpdateSpec> updates)
Build anXMessagefor a non-prepared doc update operation.- 参数:
filterParams- the filter parametersupdates- the updates specifications to perform- 返回:
- an
XMessageinstance
-
buildPrepareDocUpdate
public XMessage buildPrepareDocUpdate(int preparedStatementId, FilterParams filterParams, List<UpdateSpec> updates)
Build anXMessagefor a prepared doc update operation.- 参数:
preparedStatementId- the prepared statement idfilterParams- the filter parametersupdates- the updates specifications to perform- 返回:
- an
XMessageinstance
-
buildRowUpdate
public XMessage buildRowUpdate(FilterParams filterParams, UpdateParams updateParams)
Build anXMessagefor a non-prepared row update operation.- 参数:
filterParams- the filter parametersupdateParams- the update parameters- 返回:
- an
XMessageinstance
-
buildPrepareRowUpdate
public XMessage buildPrepareRowUpdate(int preparedStatementId, FilterParams filterParams, UpdateParams updateParams)
Build anXMessagefor a prepared row update operation.- 参数:
preparedStatementId- the prepared statement idfilterParams- the filter parametersupdateParams- the update parameters- 返回:
- an
XMessageinstance
-
buildFind
public XMessage buildFind(FilterParams filterParams)
Build anXMessagefor a non-prepared find operation.- 参数:
filterParams- the filter parameters- 返回:
- an
XMessageinstance
-
buildPrepareFind
public XMessage buildPrepareFind(int preparedStatementId, FilterParams filterParams)
Build anXMessagefor a prepared find operation.- 参数:
preparedStatementId- the prepared statement idfilterParams- the filter parameters- 返回:
- an
XMessageinstance
-
buildDelete
public XMessage buildDelete(FilterParams filterParams)
Build anXMessagefor a non-prepared delete operation.- 参数:
filterParams- the filter parameters- 返回:
- an
XMessageinstance
-
buildPrepareDelete
public XMessage buildPrepareDelete(int preparedStatementId, FilterParams filterParams)
Build anXMessagefor a prepared delete operation.- 参数:
preparedStatementId- the prepared statement idfilterParams- the filter parameters- 返回:
- an
XMessageinstance
-
buildSqlStatement
public XMessage buildSqlStatement(String statement)
Build a StmtExecute message for a SQL statement.- 指定者:
buildSqlStatement在接口中MessageBuilder<XMessage>- 参数:
statement- SQL statement string- 返回:
XMessagewrappingMysqlxSql.StmtExecute
-
buildSqlStatement
public XMessage buildSqlStatement(String statement, List<Object> args)
Build a StmtExecute message for a SQL statement.- 指定者:
buildSqlStatement在接口中MessageBuilder<XMessage>- 参数:
statement- SQL statement stringargs- list ofObjectarguments- 返回:
XMessagewrappingMysqlxSql.StmtExecute
-
buildPrepareSqlStatement
public XMessage buildPrepareSqlStatement(int preparedStatementId, String statement)
Build a Prepare message for a SQL statement.- 参数:
preparedStatementId- the prepared statement idstatement- SQL statement string- 返回:
XMessagewrappingMysqlxSql.StmtExecute
-
buildPrepareExecute
public XMessage buildPrepareExecute(int preparedStatementId, FilterParams filterParams)
Build anXMessagefor executing a prepared statement with the given filters.- 参数:
preparedStatementId- the prepared statement idfilterParams- the filter parameter values- 返回:
- an
XMessageinstance
-
buildPrepareDeallocate
public XMessage buildPrepareDeallocate(int preparedStatementId)
Build anXMessagefor deallocating a prepared statement.- 参数:
preparedStatementId- the prepared statement id- 返回:
- an
XMessageinstance
-
buildCreateCollection
public XMessage buildCreateCollection(String schemaName, String collectionName, Schema.CreateCollectionOptions options)
-
buildModifyCollectionOptions
public XMessage buildModifyCollectionOptions(String schemaName, String collectionName, Schema.ModifyCollectionOptions options)
-
buildCreateCollection
public XMessage buildCreateCollection(String schemaName, String collectionName)
-
buildClose
public XMessage buildClose()
- 指定者:
buildClose在接口中MessageBuilder<XMessage>
-
buildListObjects
public XMessage buildListObjects(String schemaName, String pattern)
List the objects in the given schema. Returns a table as so:| name | type | |---------------------+------------| | CollectionTest | COLLECTION | | some_view | VIEW | | xprotocol_test_test | TABLE |
.- 参数:
schemaName- schema namepattern- object name pattern- 返回:
- XMessage
-
buildListNotices
public XMessage buildListNotices()
List the notices the server allows subscribing to. Returns a table as so:| notice (string) | enabled (int) | |---------------------+---------------| | warnings | 1 |
- 返回:
- XMessage
-
buildCreateCollectionIndex
public XMessage buildCreateCollectionIndex(String schemaName, String collectionName, CreateIndexParams params)
-
buildDropCollectionIndex
public XMessage buildDropCollectionIndex(String schemaName, String collectionName, String indexName)
-
buildSha256MemoryAuthStart
public XMessage buildSha256MemoryAuthStart()
-
buildSha256MemoryAuthContinue
public XMessage buildSha256MemoryAuthContinue(String user, String password, byte[] nonce, String database)
-
buildMysql41AuthStart
public XMessage buildMysql41AuthStart()
-
buildMysql41AuthContinue
public XMessage buildMysql41AuthContinue(String user, String password, byte[] salt, String database)
-
buildPlainAuthStart
public XMessage buildPlainAuthStart(String user, String password, String database)
-
buildSessionResetAndClose
public XMessage buildSessionResetAndClose()
-
buildSessionResetKeepOpen
public XMessage buildSessionResetKeepOpen()
-
buildExpectOpen
public XMessage buildExpectOpen()
-
buildComQuery
public XMessage buildComQuery(XMessage sharedPacket, Session sess, PreparedQuery preparedQuery, QueryBindings bindings, String characterEncoding)
- 指定者:
buildComQuery在接口中MessageBuilder<XMessage>
-
-