Package com.zendesk.maxwell.schema
Class MysqlSavedSchema
- java.lang.Object
-
- com.zendesk.maxwell.schema.MysqlSavedSchema
-
public class MysqlSavedSchema extends Object
-
-
Constructor Summary
Constructors Constructor Description MysqlSavedSchema(MaxwellContext context, Schema schema, Position position)
MysqlSavedSchema(Long serverID, CaseSensitivity sensitivity)
MysqlSavedSchema(Long serverID, CaseSensitivity sensitivity, Schema schema, Position position)
MysqlSavedSchema(Long serverID, CaseSensitivity sensitivity, Schema schema, Position position, long baseSchemaID, List<ResolvedSchemaChange> deltas)
-
Method Summary
-
-
-
Constructor Detail
-
MysqlSavedSchema
public MysqlSavedSchema(Long serverID, CaseSensitivity sensitivity) throws SQLException
- Throws:
SQLException
-
MysqlSavedSchema
public MysqlSavedSchema(Long serverID, CaseSensitivity sensitivity, Schema schema, Position position) throws SQLException
- Throws:
SQLException
-
MysqlSavedSchema
public MysqlSavedSchema(MaxwellContext context, Schema schema, Position position) throws SQLException
- Throws:
SQLException
-
MysqlSavedSchema
public MysqlSavedSchema(Long serverID, CaseSensitivity sensitivity, Schema schema, Position position, long baseSchemaID, List<ResolvedSchemaChange> deltas) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
createDerivedSchema
public MysqlSavedSchema createDerivedSchema(Schema newSchema, Position position, List<ResolvedSchemaChange> deltas) throws SQLException
- Throws:
SQLException
-
getSchemaID
public Long getSchemaID()
-
save
public Long save(Connection connection) throws SQLException
- Throws:
SQLException
-
saveSchema
public Long saveSchema(Connection conn) throws SQLException
- Throws:
SQLException
-
saveFullSchema
public void saveFullSchema(Connection conn, Long schemaId) throws SQLException
- Throws:
SQLException
-
restore
public static MysqlSavedSchema restore(MaxwellContext context, Position targetPosition) throws SQLException, InvalidSchemaError
- Throws:
SQLException
InvalidSchemaError
-
restore
public static MysqlSavedSchema restore(ConnectionPool pool, Long serverID, CaseSensitivity caseSensitivity, Position targetPosition) throws SQLException, InvalidSchemaError
- Throws:
SQLException
InvalidSchemaError
-
restoreFromSchemaID
public static MysqlSavedSchema restoreFromSchemaID(Long schemaID, Connection conn, CaseSensitivity sensitivity) throws SQLException, InvalidSchemaError
- Throws:
SQLException
InvalidSchemaError
-
restoreFromSchemaID
protected void restoreFromSchemaID(Connection conn, Long schemaID) throws SQLException, InvalidSchemaError
- Throws:
SQLException
InvalidSchemaError
-
getSchema
public Schema getSchema()
-
setSchema
public void setSchema(Schema s)
-
delete
public static void delete(Connection connection, long schema_id) throws SQLException
- Throws:
SQLException
-
getBinlogPosition
public BinlogPosition getBinlogPosition()
-
getPosition
public Position getPosition()
-
handleVersionUpgrades
protected void handleVersionUpgrades(ConnectionPool pool) throws SQLException, InvalidSchemaError
- Throws:
SQLException
InvalidSchemaError
-
getBaseSchemaID
public Long getBaseSchemaID()
-
-