JavaXT
|
|||||||
DbUtils ClassProvides static methods used to initialize a database, copy data from one database to another, find/remove duplicates records, etc.
ConstructorsThere are no public constructors.Static MethodsinitSchema( Database database, String schema, String tableSpace ) returns boolean Used to execute SQL statements and populate a database with table, views, triggers, etc. If the target database does not exist, an attempt is made to create a new database. Currently only supports PostgreSQL and H2.
copyTable( String tableName, String where, Database sourceDB, Database destDB, int pageSize, int numThreads ) returns void Used to transfer records between 2 databases for a given table. findMismatch( String tableName, Database sourceDB, Database destDB, int pageSize, long offset, AtomicLong rowID ) returns void Used to find mismatched between the 2 databases for a given table. deleteDuplicates( String tableName, Database database, Long startRow, Long endRow, int pageSize, int numThreads ) returns void Used to find and delete duplicates in a given table. getJson( Recordset rs ) returns JSONObject Returns a JSON representation of a record in a Recordset. Column names are used as keys and the corresponding value is used as the value. Note that the column names are represented using camel case. If there are duplicate column names in the Recordset (e.g. "select user.id, contact.id from ...") the first column name and value is used (e.g. "user.id" column). |