com.continuent.tungsten.replicator.database
Class MySQLOperationMatcher
java.lang.Object
com.continuent.tungsten.replicator.database.MySQLOperationMatcher
- All Implemented Interfaces:
- SqlOperationMatcher
public class MySQLOperationMatcher
- extends java.lang.Object
- implements SqlOperationMatcher
Parses SQL statements to extract the SQL operation and the object, identified
by type, name and schema, to which it pertains.
- Version:
- 1.0
- Author:
- Robert Hodges
|
Field Summary |
protected java.util.regex.Pattern |
alter
|
protected java.util.regex.Pattern |
begin
|
protected java.util.regex.Pattern |
beginEnd
|
protected java.util.regex.Pattern |
commit
|
protected java.util.regex.Pattern |
createDb
|
protected java.util.regex.Pattern |
createFunction
|
protected java.util.regex.Pattern |
createIndex
|
protected java.util.regex.Pattern |
createProcedure
|
protected java.util.regex.Pattern |
createTable
|
protected java.util.regex.Pattern |
createView
|
protected java.util.regex.Pattern |
delete
|
protected java.util.regex.Pattern |
dropDb
|
protected java.util.regex.Pattern |
dropFunction
|
protected java.util.regex.Pattern |
dropIndex
|
protected java.util.regex.Pattern |
dropProcedure
|
protected java.util.regex.Pattern |
dropTable
|
protected java.util.regex.Pattern |
dropTableMdata
|
protected java.util.regex.Pattern |
dropView
|
protected java.util.regex.Pattern |
flushTables
|
protected java.util.regex.Pattern |
insert
|
protected java.util.regex.Pattern |
loadData
|
protected java.util.regex.Pattern |
replace
|
protected java.util.regex.Pattern |
rollback
|
protected java.util.regex.Pattern |
select
|
protected java.util.regex.Pattern |
set
|
protected java.util.regex.Pattern |
truncate
|
protected java.util.regex.Pattern |
update
|
|
Method Summary |
SqlOperation |
match(java.lang.String inputStatement)
Examines a SQL DDL/DML statement and returns the name of the SQL object
it affects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createDb
protected java.util.regex.Pattern createDb
dropDb
protected java.util.regex.Pattern dropDb
createTable
protected java.util.regex.Pattern createTable
dropTable
protected java.util.regex.Pattern dropTable
dropTableMdata
protected java.util.regex.Pattern dropTableMdata
insert
protected java.util.regex.Pattern insert
replace
protected java.util.regex.Pattern replace
update
protected java.util.regex.Pattern update
delete
protected java.util.regex.Pattern delete
truncate
protected java.util.regex.Pattern truncate
loadData
protected java.util.regex.Pattern loadData
set
protected java.util.regex.Pattern set
createProcedure
protected java.util.regex.Pattern createProcedure
dropProcedure
protected java.util.regex.Pattern dropProcedure
createFunction
protected java.util.regex.Pattern createFunction
dropFunction
protected java.util.regex.Pattern dropFunction
begin
protected java.util.regex.Pattern begin
commit
protected java.util.regex.Pattern commit
rollback
protected java.util.regex.Pattern rollback
beginEnd
protected java.util.regex.Pattern beginEnd
select
protected java.util.regex.Pattern select
alter
protected java.util.regex.Pattern alter
createIndex
protected java.util.regex.Pattern createIndex
dropIndex
protected java.util.regex.Pattern dropIndex
createView
protected java.util.regex.Pattern createView
dropView
protected java.util.regex.Pattern dropView
flushTables
protected java.util.regex.Pattern flushTables
MySQLOperationMatcher
public MySQLOperationMatcher()
- Create new instance.
match
public SqlOperation match(java.lang.String inputStatement)
- Examines a SQL DDL/DML statement and returns the name of the SQL object
it affects. To avoid unnecessary regex searches we test for the beginning
keyword of each expression.
- Specified by:
match in interface SqlOperationMatcher