FabricMySQLConnection API

The following methods are available in the com.mysql.fabric.jdbc.FabricMySQLConnection interface.

  • void clearServerSelectionCriteria()

    Clear all the state that is used to determine which server to send queries to.

  • void setShardKey(String shardKey) throws SQLException

    Set the shard key for the data being accessed.

  • String getShardKey()

    Get the shard key for the data being accessed.

  • void setShardTable(String shardTable) throws SQLException

    Set the table being accessed. Can be a table name or a database and table name pair in the form db_name.tbl_name. The table must be known by Fabric as a sharded table.

  • String getShardTable()

    Get the name of the table being accessed.

  • void setServerGroupName(String serverGroupName) throws SQLException

    Set the server group name to connect to. Direct server group selection is mutually exclusive of sharded data access.

  • String getServerGroupName()

    Get the server group name when using direct server group selection.

  • ServerGroup getCurrentServerGroup()

    Get the current server group if sufficient server group selection has been provided. Otherwise null.

  • void clearQueryTables() throws SQLException

    Clear the list of tables for the last query. This also clears the shard mapping/table and must be given again for the next query via setShardTable() or addQueryTable().

  • void addQueryTable(String tableName) throws SQLException

    Specify that the given table is intended to be used in the next query.

  • Set<String> getQueryTables()

    Get the list of tables intended to be used in the next query.

Download this Manual
PDF (US Ltr) - 1.1Mb
PDF (A4) - 1.1Mb
EPUB - 292.9Kb
HTML Download (TGZ) - 224.3Kb
HTML Download (Zip) - 236.0Kb
User Comments
Sign Up Login You must be logged in to post a comment.