Documentation Home
MySQL Utilities 1.5 Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.5Mb
PDF (A4) - 1.5Mb
HTML Download (TGZ) - 289.5Kb
HTML Download (Zip) - 301.7Kb 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.

User Comments
Sign Up Login You must be logged in to post a comment.