private void put(List<Object[]> args, List<Object[]> overflowArgs) { if (!overflowArgs.isEmpty()) { if (config.overflowMigrationState() == OverflowMigrationState.UNSTARTED) { conns.get().insertManyUnregisteredQuery("/* INSERT_OVERFLOW */" + " INSERT INTO " + config.singleOverflowTable() + " (id, val) VALUES (?, ?) ", overflowArgs); } else { String shortOverflowTableName = getShortOverflowTableName(); conns.get().insertManyUnregisteredQuery( "/* INSERT_OVERFLOW (" + shortOverflowTableName + ") */" + " INSERT INTO " + shortOverflowTableName + " (id, val) VALUES (?, ?) ", overflowArgs); } } try { String shortTableName = oraclePrefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_ONE (" + shortTableName + ") */" + " INSERT INTO " + shortTableName + " (row_name, col_name, ts, val, overflow) " + " VALUES (?, ?, ?, ?, ?) ", args); } catch (PalantirSqlException e) { if (ExceptionCheck.isUniqueConstraintViolation(e)) { throw new KeyAlreadyExistsException("primary key violation", e); } throw e; } }
private void put(List<Object[]> args) { try { String prefixedTableName = prefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_ONE (" + prefixedTableName + ") */" + " INSERT INTO " + prefixedTableName + " (row_name, col_name, ts, val) " + " VALUES (?, ?, ?, ?) ", args); } catch (PalantirSqlException e) { if (ExceptionCheck.isUniqueConstraintViolation(e)) { throw new KeyAlreadyExistsException("primary key violation", e); } throw e; } }
try { String prefixedTableName = prefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_WHERE_NOT_EXISTS (" + prefixedTableName + ") */" + " INSERT INTO " + prefixedTableName + " (row_name, col_name, ts, val) " + " SELECT ?, ?, ?, ? FROM DUAL"
try { String shortTableName = oraclePrefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_WHERE_NOT_EXISTS (" + shortTableName + ") */" + " INSERT INTO " + shortTableName + " (row_name, col_name, ts, val, overflow)"
private void put(List<Object[]> args) { try { String prefixedTableName = prefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_ONE (" + prefixedTableName + ") */" + " INSERT INTO " + prefixedTableName + " (row_name, col_name, ts, val) " + " VALUES (?, ?, ?, ?) ", args); } catch (PalantirSqlException e) { if (ExceptionCheck.isUniqueConstraintViolation(e)) { throw new KeyAlreadyExistsException("primary key violation", e); } throw e; } }
private void put(List<Object[]> args, List<Object[]> overflowArgs) { if (!overflowArgs.isEmpty()) { if (config.overflowMigrationState() == OverflowMigrationState.UNSTARTED) { conns.get().insertManyUnregisteredQuery("/* INSERT_OVERFLOW */" + " INSERT INTO " + config.singleOverflowTable() + " (id, val) VALUES (?, ?) ", overflowArgs); } else { String shortOverflowTableName = getShortOverflowTableName(); conns.get().insertManyUnregisteredQuery( "/* INSERT_OVERFLOW (" + shortOverflowTableName + ") */" + " INSERT INTO " + shortOverflowTableName + " (id, val) VALUES (?, ?) ", overflowArgs); } } try { String shortTableName = oraclePrefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_ONE (" + shortTableName + ") */" + " INSERT INTO " + shortTableName + " (row_name, col_name, ts, val, overflow) " + " VALUES (?, ?, ?, ?, ?) ", args); } catch (PalantirSqlException e) { if (ExceptionCheck.isUniqueConstraintViolation(e)) { throw new KeyAlreadyExistsException("primary key violation", e); } throw e; } }
try { String prefixedTableName = prefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_WHERE_NOT_EXISTS (" + prefixedTableName + ") */" + " INSERT INTO " + prefixedTableName + " (row_name, col_name, ts, val) " + " SELECT ?, ?, ?, ? FROM DUAL"
try { String shortTableName = oraclePrefixedTableNames.get(tableRef, conns); conns.get().insertManyUnregisteredQuery("/* INSERT_WHERE_NOT_EXISTS (" + shortTableName + ") */" + " INSERT INTO " + shortTableName + " (row_name, col_name, ts, val, overflow)"