类 XMessageBuilder

    • 构造器详细资料

      • XMessageBuilder

        public XMessageBuilder()
    • 方法详细资料

      • buildCapabilitiesGet

        public XMessage buildCapabilitiesGet()
      • buildDocInsert

        public XMessage buildDocInsert​(String schemaName,
                                       String collectionName,
                                       List<String> json,
                                       boolean upsert)
        Build an XMessage for a non-prepared doc insert operation.
        参数:
        schemaName - the schema name
        collectionName - the collection name
        json - the documents to insert
        upsert - Whether this is an upsert operation or not
        返回:
        an XMessage instance
      • buildRowInsert

        public XMessage buildRowInsert​(String schemaName,
                                       String tableName,
                                       InsertParams insertParams)
        Build an XMessage for a non-prepared row insert operation.
        参数:
        schemaName - the schema name
        tableName - the table name
        insertParams - the parameters to insert
        返回:
        an XMessage instance
      • buildDocUpdate

        public XMessage buildDocUpdate​(FilterParams filterParams,
                                       List<UpdateSpec> updates)
        Build an XMessage for a non-prepared doc update operation.
        参数:
        filterParams - the filter parameters
        updates - the updates specifications to perform
        返回:
        an XMessage instance
      • buildPrepareDocUpdate

        public XMessage buildPrepareDocUpdate​(int preparedStatementId,
                                              FilterParams filterParams,
                                              List<UpdateSpec> updates)
        Build an XMessage for a prepared doc update operation.
        参数:
        preparedStatementId - the prepared statement id
        filterParams - the filter parameters
        updates - the updates specifications to perform
        返回:
        an XMessage instance
      • buildRowUpdate

        public XMessage buildRowUpdate​(FilterParams filterParams,
                                       UpdateParams updateParams)
        Build an XMessage for a non-prepared row update operation.
        参数:
        filterParams - the filter parameters
        updateParams - the update parameters
        返回:
        an XMessage instance
      • buildPrepareRowUpdate

        public XMessage buildPrepareRowUpdate​(int preparedStatementId,
                                              FilterParams filterParams,
                                              UpdateParams updateParams)
        Build an XMessage for a prepared row update operation.
        参数:
        preparedStatementId - the prepared statement id
        filterParams - the filter parameters
        updateParams - the update parameters
        返回:
        an XMessage instance
      • buildFind

        public XMessage buildFind​(FilterParams filterParams)
        Build an XMessage for a non-prepared find operation.
        参数:
        filterParams - the filter parameters
        返回:
        an XMessage instance
      • buildPrepareFind

        public XMessage buildPrepareFind​(int preparedStatementId,
                                         FilterParams filterParams)
        Build an XMessage for a prepared find operation.
        参数:
        preparedStatementId - the prepared statement id
        filterParams - the filter parameters
        返回:
        an XMessage instance
      • buildDelete

        public XMessage buildDelete​(FilterParams filterParams)
        Build an XMessage for a non-prepared delete operation.
        参数:
        filterParams - the filter parameters
        返回:
        an XMessage instance
      • buildPrepareDelete

        public XMessage buildPrepareDelete​(int preparedStatementId,
                                           FilterParams filterParams)
        Build an XMessage for a prepared delete operation.
        参数:
        preparedStatementId - the prepared statement id
        filterParams - the filter parameters
        返回:
        an XMessage instance
      • buildPrepareSqlStatement

        public XMessage buildPrepareSqlStatement​(int preparedStatementId,
                                                 String statement)
        Build a Prepare message for a SQL statement.
        参数:
        preparedStatementId - the prepared statement id
        statement - SQL statement string
        返回:
        XMessage wrapping MysqlxSql.StmtExecute
      • buildPrepareExecute

        public XMessage buildPrepareExecute​(int preparedStatementId,
                                            FilterParams filterParams)
        Build an XMessage for executing a prepared statement with the given filters.
        参数:
        preparedStatementId - the prepared statement id
        filterParams - the filter parameter values
        返回:
        an XMessage instance
      • buildPrepareDeallocate

        public XMessage buildPrepareDeallocate​(int preparedStatementId)
        Build an XMessage for deallocating a prepared statement.
        参数:
        preparedStatementId - the prepared statement id
        返回:
        an XMessage instance
      • buildCreateCollection

        public XMessage buildCreateCollection​(String schemaName,
                                              String collectionName)
      • buildDropCollection

        public XMessage buildDropCollection​(String schemaName,
                                            String collectionName)
      • 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 name
        pattern - object name pattern
        返回:
        XMessage
      • buildEnableNotices

        public XMessage buildEnableNotices​(String... notices)
      • buildDisableNotices

        public XMessage buildDisableNotices​(String... notices)
      • buildListNotices

        public XMessage buildListNotices()
        List the notices the server allows subscribing to. Returns a table as so:
         | notice (string)     | enabled (int) |
         |---------------------+---------------|
         | warnings            | 1             |
         
        返回:
        XMessage
      • 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)
      • buildExternalAuthStart

        public XMessage buildExternalAuthStart​(String database)
      • buildSessionResetAndClose

        public XMessage buildSessionResetAndClose()
      • buildSessionResetKeepOpen

        public XMessage buildSessionResetKeepOpen()
      • buildExpectOpen

        public XMessage buildExpectOpen()