MySQL 8.3.0
Source Code Documentation
Implementation of the X Protocol by the X Plugin

Topics in this section:

The X Plugin implements the X Protocol for the MySQL Server.

Mysqlx::Sql::StmtExecute

Mysqlx::Sql::StmtExecute implements several namespaces:

sql
The SQL interface which expects:
  • .stmt to be a string that the MySQL SQL parser understands
  • .args replaces wild-cards in .stmt if any exist
mysqlx
The mysqlx namespace is dedicated for plugin internal commands

Admin commands

  • create_collection - create a new collection.
    Required arguments:
    • name: string - name of created collection
    • schema: string - name of collection's schema
    • options: object, optional - additional collection options
      • reuse_existing: bool, optional - semantically the same as create table if not exists
      • validation: object, optional - validation schema options
        • schema: object|string, optional - json validation document
        • level: string, optional - level of validation {STRICT|OFF}; default: STRICT
  • create_collection_index - create new index on specifed collection.
    Required arguments:
    • name: string - name of index
    • collection: string - name of indexed collection
    • schema: string - name of collection's schema
    • unique: bool - whether the index should be a unique index
    • type: string, optional - name of index's type {INDEX|SPATIAL|FULLTEXT}; default: INDEX
    • with_parser: string, optional - name of parser for fulltext index {
    • fields|constraint: object, list - detailed information for the generated column
      • field|member: string - path to document member for which the index will be created
      • required: bool, optional - whether the generated column will be created as NOT NULL
      • type: string, optional - data type of the indexed values
      • options: int, optional - parameter for generation spatial column
      • srid: int, optional - parameter for generation spatial column
      • array: bool, optional - indexed field is an array of scalars
  • disable_notices - disable sending notices.
    Required arguments:
    • notice: string, list - name (or names) of enabled notice
  • drop_collection - drop existing collection.
    Required arguments:
    • name: string - name of dropped collection
    • schema: string - name of collection's schema
  • drop_collection_index - drop existing index for collection.
    Required arguments:
    • name: string - name of dropped index
    • collection: string - name of collection with dropped index
    • schema: string - name of collection's schema
  • enable_notices - enable sending notices.
    Required arguments:
    • notice: string, list - name(s) of enabled notice(s)
  • ensure_collection - create a collection; creation is skipped when a collection exists.
    Required arguments:
    • name: string - name of created collection
    • schema: string, optional - name of collection's schema
    • options: object, optional - additional collection options
      • validation: see validation option for create_collection command
  • get_collection_options - get options for a specified collection.
    Required arguments:
    • name: string - name of collection
    • schema: string - name of collection's schema
    • options: string, list - collection options to fetch
  • kill_client - drop specified client.
    Required arguments:
    • id: bigint - the client identification number
  • list_clients - list all connected clients.
    No required arguments
  • list_notices - list all available notices.
    No required arguments
  • list_objects - list objects (tables, collections or views) for specified schema.
    Required arguments:
    • schema: string, optional - name of listed object's schema
    • pattern: string, optional - a filter to use for matching object names to be returned
  • modify_collection_options - modify options for a specified collection.
    Required arguments:
    • name: string - name of collection
    • schema: string - name of collection's schema
    • options: object, optional - additional collection options
      • validation: see validation option for create_collection command
  • ping - checks whether the connection to the plugin is working.
    No required arguments