Parameters:
     - login
     - oldTableName
     - newTableName
483538
def renameTable(self, login, oldTableName, newTableName):
    
    self.send_renameTable(login, oldTableName, newTableName)
    self.recv_renameTable()
599098
def updateAndFlush(self, login, tableName, cells):
    
    self.send_updateAndFlush(login, tableName, cells)
    self.recv_updateAndFlush()
171262
def hasTablePermission(self, login, user, table, perm):
    
    self.send_hasTablePermission(login, user, table, perm)
    return self.recv_hasTablePermission()
781236
def last_insert_id(self, cursor, table_name, pk_name):
        
        # TODO: Check how the `last_insert_id` is being used in the upper layers
        #       in context of multithreaded access, compare with other backends

        # IDENT_CURRENT:  http://msdn2.microsoft.com/en-us/library/ms175098.aspx
        # SCOPE_IDENTITY: http://msdn2.microsoft.com/en-us/library/ms190315.aspx
        # @@IDENTITY:     http://msdn2.microsoft.com/en-us/library/ms187342.aspx

        # IDENT_CURRENT is not limited by scope and session; it is limited to
        # a specified table. IDENT_CURRENT returns the value generated for
        # a specific table in any session and any scope.
        # SCOPE_IDENTITY and @@IDENTITY return the last identity values that
        # are generated in any table in the current session. However,
        # SCOPE_IDENTITY returns values inserted only within the current scope;
        # @@IDENTITY is not limited to a specific scope.

        table_name = self.quote_name(table_name)
        cursor.execute("SELECT CAST(IDENT_CURRENT(%s) as bigint)", [table_name])
        return cursor.fetchone()[0]
1284143
def removeIterator(self, login, tableName, iterName, scopes):
    
    self.send_removeIterator(login, tableName, iterName, scopes)
    self.recv_removeIterator()
1317155
public function get_login_user_info( $table_name ){
		$user_info = $this->exdb->session()->get('user_info');
		if( is_array( @$user_info[$table_name] ) ){
			return $user_info[$table_name];
		}
		return false;
	}
892395
def importTable(self, login, tableName, importDir):
    
    self.send_importTable(login, tableName, importDir)
    self.recv_importTable()
513697
async function validateDeleted (args) {
    try {
        var deletedTable = await this.mysql().query(
            sql.showCreateTable({name: `${this.name}Delete`}), {}, {}, args.session
        )
    }
    // exception will be thrown if table does not exist
    catch (err) {
        return
    }
    // get deleted records
    const [ results ] = await this.mysql().query(sql.selectDeleted(this))
    debug(`checking ${results.length} deleted records`)
    // check each record and delete if needed
    for (const result of results) {
        // load current record
        var record = await this.query({
            allow: true,
            cache: false,
            current: true,
            one: true,
            session: args.session,
            where: { id: result.id }
        })
        // skip if record not found
        if (!defined(record)) {
            continue
        }
        // skip if id does not match
        if (record.id !== result.id) {
            continue
        }
        // skip if record already deleted
        if (record.isDeleted) {
            continue
        }
        debug(`deleting ${record.id}`)
        // delete record
        await record.delete({allow: true, cache: false})
    }
}
282987
def onlineTable(self, login, tableName):
    
    self.send_onlineTable(login, tableName)
    self.recv_onlineTable()
368151
def deleteRows(self, login, tableName, startRow, endRow):
    
    self.send_deleteRows(login, tableName, startRow, endRow)
    self.recv_deleteRows()
1365918
private void migrateTable(TablePkFkVO table) throws SQLException {
		logger.info("Migrating Table: {}", table.getName());

		helper.executeDDL("renameColumn",
			ObjectBuilder.<String, Object>map()
				.put("table", table.getName())
				.put("col_cur_name", table.getPkColumn())
				.put("col_new_name", "old_" + table.getPkColumn())
				.get()
		);
		logger.info("\tRename PK column: {}", table.getPkColumn());

		helper.executeDDL("addColumn",
			ObjectBuilder.<String, Object>map()
				.put("table", table.getName())
				.put("col_name", table.getPkColumn())
				.put("col_type", "varchar2(255 char)") //TODO
				.get()
		);
		logger.info("\tAdd new PK column: {}", table.getPkColumn());

		for (RefConsVO refConsVO : table.getReferencedBy()) {
			helper.executeDDL("renameColumn",
				ObjectBuilder.<String, Object>map()
					.put("table", refConsVO.getTableName())
					.put("col_cur_name", refConsVO.getColumnName())
					.put("col_new_name", "old_" + refConsVO.getColumnName())
					.get()
			);

			helper.executeDDL("addColumn",
				ObjectBuilder.<String, Object>map()
					.put("table", refConsVO.getTableName())
					.put("col_name", refConsVO.getColumnName())
					.put("col_type", "varchar2(255 char)") //TODO
					.get()
			);
		}
		logger.info("\tRename & Add FK columns");

		connection.setAutoCommit(false);

		try {
			String updateIdSql = String.format("update %1$s set %2$s = :new_id where old_%2$s = :cur_id",
				table.getName(), table.getPkColumn());
			NamedParameterStatement updateIdNps = helper.createNPS(XQuery.sql(updateIdSql));

			String selectIdsSql = String.format("select old_%s from %s", table.getPkColumn(), table.getName());
			List<Object> ids = helper.firstColAsList(XQuery.sql(selectIdsSql));
			for (Object id : ids) {
				Object newId = UUID.randomUUID().toString(); //TODO

				updateIdNps
					.setParameters(ObjectBuilder.<String, Object>map()
						.put("new_id", newId)
						.put("cur_id", id)
						.get())
					.executeUpdate();

				for (RefConsVO refConsVO : table.getReferencedBy()) {
					String updateFkSql = String.format("update %1$s set %2$s = :new_id where old_%2$s = :cur_id",
						refConsVO.getTableName(), refConsVO.getColumnName());
					NamedParameterStatement updateFkNps = helper.createNPS(XQuery.sql(updateFkSql));

					updateFkNps
						.setParameters(ObjectBuilder.<String, Object>map()
							.put("new_id", newId)
							.put("cur_id", id)
							.get())
						.executeUpdate();
				}
			}

			connection.commit();
		} catch (SQLException e) {
			logger.error("Data Insert", e);
			connection.rollback();
			throw e;
		}

		for (RefConsVO refConsVO : table.getReferencedBy()) {
			helper.executeDDL("dropCons", ObjectBuilder.<String, Object>map()
				.put("table", refConsVO.getTableName())
				.put("cons", refConsVO.getConsName())
				.get());

			dropOtherCons(refConsVO.getTableName(), "OLD_" + refConsVO.getColumnName());
		}

		helper.executeDDL("dropCons", ObjectBuilder.<String, Object>map()
			.put("table", table.getName())
			.put("cons", table.getPkConstraint())
			.get());

		dropOtherCons(table.getName(), "OLD_" + table.getPkColumn());


		helper.executeDDL("addPkCons", ObjectBuilder.<String, Object>map()
			.put("table", table.getName())
			.put("cons", table.getPkConstraint())
			.put("col", table.getPkColumn())
			.get());

		for (RefConsVO refConsVO : table.getReferencedBy()) {
			helper.executeDDL("addFkCons", ObjectBuilder.<String, Object>map()
				.put("table", refConsVO.getTableName())
				.put("cons", refConsVO.getConsName())
				.put("col", refConsVO.getColumnName())
				.put("dest_table", table.getName())
				.get());
		}
	}
169572
@Deprecated
    public String registerTableOverride(String schema, String oldTable, String newTable) {
        SchemaAndTable st = registerTableOverride(schema, oldTable, schema, newTable);
        return st != null ? st.getTable() : null;
    }
810245
def getTableProperties(self, login, tableName):
    
    self.send_getTableProperties(login, tableName)
    return self.recv_getTableProperties()
836945
def clearLocatorCache(self, login, tableName):
    
    self.send_clearLocatorCache(login, tableName)
    self.recv_clearLocatorCache()
738923
def createBatchScanner(self, login, tableName, options):
    
    self.send_createBatchScanner(login, tableName, options)
    return self.recv_createBatchScanner()
949078
def exportTable(self, login, tableName, exportDir):
    
    self.send_exportTable(login, tableName, exportDir)
    self.recv_exportTable()
439597
def migrate_050_to_051(session):
    
    entries_to_update = session.query(Entry).filter(
            Entry.forgot_sign_out.is_(True)).filter(
            Entry.time_out.isnot(None))

    for entry in entries_to_update:
        entry.time_out = None
        logging.info('Entry updated {}'.format(entry.uuid))
        logging.debug(entry.uuid)
        session.add(entry)