Examples of insertRecord()


Examples of nz.co.transparent.client.controller.GenericTransactionController.insertRecord()

    columnMap.put("updater_person_id", new Integer(3));
   
    try {
      Connection conn = DataSourceHandler.getDataSource().getConnection();
      GenericTransactionController controller = new GenericTransactionController(conn);
      int result = controller.insertRecord("role", "role_code", columnMap);
      System.out.println("Number of records affected = " + result);
      conn.commit();
      DbUtils.close(conn);
    } catch (ControllerException ce) {
      System.out.println(ce.getMessage());
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.insertRecord()

        try {
            schemaTable.lock();
            try {
                db.getOptions().changeSchemaVersion();

                long rowId = schemaTable.insertRecord(TRIGGER_TYPE, triggerName, tableName, 0, sql);
                triggerDef.setRowId(rowId);
                triggerDefs.put(triggerName, triggerDef);
                return triggerDef;

            } finally {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.insertRecord()

            try {

                db.getOptions().changeSchemaVersion();

                final int page = btree.createTable(BTREE_CREATE_TABLE_FLAGS);
                final long rowId = schemaTable.insertRecord(TABLE_TYPE, tableName, tableName, page, createTableSql);

                addConstraints(schemaTable, tableDef);

                tableDef.setPage(page);
                tableDef.setRowId(rowId);
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.insertRecord()

                db.getOptions().changeSchemaVersion();

                final int page = btree.createTable(BTREE_CREATE_INDEX_FLAGS);

                final long rowId = schemaTable.insertRecord(INDEX_TYPE, indexName, tableName, page, createIndexSQL);

                indexDef.setPage(page);
                indexDef.setRowId(rowId);
                indexDef.bindColumns(tableDef);
                indexDefs.put(indexName, indexDef);
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.insertRecord()

                final String alteredSql = getTableAlteredSql(schemaTable.getSqlField(), alterTableDef);

                db.getOptions().changeSchemaVersion();

                schemaTable.insertRecord(TABLE_TYPE, newTableName, newTableName, page, alteredSql);

                if (renameTable && !tableName.equals(newTableName)) {
                    renameTablesIndices(schemaTable, tableName, newTableName, getAlterTableName(alterTableDef));
                }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.insertRecord()

            try {

                db.getOptions().changeSchemaVersion();

                final long rowId = schemaTable.insertRecord(TABLE_TYPE, tableName, tableName, page,
                        createVirtualTableSQL);

                tableDef.setPage(page);
                tableDef.setRowId(rowId);
                virtualTableDefs.put(tableName, tableDef);
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.insertRecord()

        try {
            schemaTable.lock();
            try {
                db.getOptions().changeSchemaVersion();

                long rowId = schemaTable.insertRecord(VIEW_TYPE, viewName, viewName, 0, sql);
                viewDef.setRowId(rowId);
                viewDefs.put(viewName, viewDef);
                return viewDef;

            } finally {
View Full Code Here

Examples of org.xtreemfs.babudb.api.transaction.Transaction.insertRecord()

        DatabaseManager dbMan = database.getDatabaseManager();
       
        // create and execute a transaction
        Transaction txn = dbMan.createTransaction();
        txn.createDatabase("test", 3);
        txn.insertRecord("test", 0, "hello".getBytes(), "world".getBytes());
        txn.insertRecord("test", 1, "key".getBytes(), "value".getBytes());
        dbMan.executeTransaction(txn);
       
        // check if the database is there
        Database db = dbMan.getDatabase("test");
View Full Code Here

Examples of org.xtreemfs.babudb.api.transaction.Transaction.insertRecord()

       
        // create and execute a transaction
        Transaction txn = dbMan.createTransaction();
        txn.createDatabase("test", 3);
        txn.insertRecord("test", 0, "hello".getBytes(), "world".getBytes());
        txn.insertRecord("test", 1, "key".getBytes(), "value".getBytes());
        dbMan.executeTransaction(txn);
       
        // check if the database is there
        Database db = dbMan.getDatabase("test");
        assertNotNull(db);
View Full Code Here

Examples of org.xtreemfs.babudb.api.transaction.Transaction.insertRecord()

        DatabaseManager dbMan = database.getDatabaseManager();
       
        // create and execute a transaction
        Transaction txn = dbMan.createTransaction();
        txn.createDatabase("test", 2);
        txn.insertRecord("test", 0, "hello".getBytes(), "world".getBytes());
        txn.insertRecord("test", 1, "key".getBytes(), "value".getBytes());
        dbMan.executeTransaction(txn);
       
        // shutdown and restart the database
        database.shutdown();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.