if (!schemaTable.isTemporary()) { vertexLabel = sqlgGraph.getTopology().getVertexLabel(schemaTable.getSchema(), schemaTable.getTable()).orElseThrow( () -> new IllegalStateException(String.format("VertexLabel %s not found.", schemaTable.toString())));
SQLServerVertexCacheBulkRecord(SQLServerBulkCopy bulkCopy, SqlgGraph sqlgGraph, SchemaTable schemaTable, Pair<SortedSet<String>, Map<SqlgVertex, Map<String, Object>>> vertices) throws SQLServerException { this.rowIter = vertices.getRight().entrySet().iterator(); if (!schemaTable.isTemporary()) { this.propertyColumns = sqlgGraph.getTopology() .getSchema(schemaTable.getSchema()).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", schemaTable.getSchema()))) .getVertexLabel(schemaTable.getTable()).orElseThrow(() -> new IllegalStateException(String.format("VertexLabel %s not found", schemaTable.getTable()))) .getProperties(); } else { this.properties = sqlgGraph.getTopology().getPublicSchema().getTemporaryTable(VERTEX_PREFIX + schemaTable.getTable()); } int i = 1; this.columns = vertices.getLeft(); this.dummy = this.columns.isEmpty(); if (this.dummy) { bulkCopy.addColumnMapping(i, "dummy"); this.columnMetadata.put(i, new ColumnMetadata( "dummy", sqlgGraph.getSqlDialect().propertyTypeToJavaSqlType(PropertyType.INTEGER)[0], 0, 0, null, PropertyType.INTEGER )); } else { addMetaData(bulkCopy, sqlgGraph); } }
if (!schemaTable.isTemporary()) { vertexLabel = sqlgGraph.getTopology().getVertexLabel(schemaTable.getSchema(), schemaTable.getTable()).orElseThrow( () -> new IllegalStateException(String.format("VertexLabel %s not found.", schemaTable.toString())));
if (!schemaTable.isTemporary() || sqlgGraph.getSqlDialect().needsTemporaryTableSchema()) { sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(schemaTable.getSchema())); sql.append("."); if (!schemaTable.isTemporary() || !sqlgGraph.getSqlDialect().needsTemporaryTablePrefix()) { sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(VERTEX_PREFIX + schemaTable.getTable())); } else { Map<String, PropertyColumn> propertyColumns = null; Map<String, PropertyType> properties = null; if (!schemaTable.isTemporary()) { vertexLabel = sqlgGraph.getTopology() .getSchema(schemaTable.getSchema()).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", schemaTable.getSchema()))) Map<String, PropertyType> propertyTypeMap = new HashMap<>(); for (String column : columns) { if (!schemaTable.isTemporary()) { PropertyColumn propertyColumn = propertyColumns.get(column); propertyTypeMap.put(column, propertyColumn.getPropertyType()); List<Pair<PropertyType, Object>> typeAndValues = new ArrayList<>(); for (String column : columns) { if (!schemaTable.isTemporary()) { PropertyColumn propertyColumn = propertyColumns.get(column); typeAndValues.add(Pair.of(propertyColumn.getPropertyType(), parameterValueMap.get(column)));
if (!schemaTable.isTemporary() || sqlgGraph.getSqlDialect().needsTemporaryTableSchema()) { sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(schemaTable.getSchema())); sql.append("."); if (!schemaTable.isTemporary() || !sqlgGraph.getSqlDialect().needsTemporaryTablePrefix()) { sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(VERTEX_PREFIX + schemaTable.getTable())); } else { Map<String, PropertyColumn> propertyColumns = null; Map<String, PropertyType> properties = null; if (!schemaTable.isTemporary()) { vertexLabel = sqlgGraph.getTopology() .getSchema(schemaTable.getSchema()).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", schemaTable.getSchema()))) Map<String, PropertyType> propertyTypeMap = new HashMap<>(); for (String column : columns) { if (!schemaTable.isTemporary()) { PropertyColumn propertyColumn = propertyColumns.get(column); propertyTypeMap.put(column, propertyColumn.getPropertyType()); List<Pair<PropertyType, Object>> typeAndValues = new ArrayList<>(); for (String column : columns) { if (!schemaTable.isTemporary()) { PropertyColumn propertyColumn = propertyColumns.get(column); typeAndValues.add(Pair.of(propertyColumn.getPropertyType(), parameterValueMap.get(column)));
SchemaTable schemaTable = entry.getKey(); VertexLabel vertexLabel = null; if (!schemaTable.isTemporary()) { vertexLabel = sqlgGraph.getTopology().getVertexLabel(schemaTable.getSchema(), schemaTable.getTable()).orElseThrow( () -> new IllegalStateException(String.format("VertexLabel %s not found.", schemaTable.toString()))); if (schemaTable.isTemporary()) { bulkCopy.setDestinationTableName( sqlgGraph.getSqlDialect().maybeWrapInQoutes(sqlgGraph.getSqlDialect().temporaryTablePrefix() + VERTEX_PREFIX + schemaTable.getTable()) if (!schemaTable.isTemporary() && numberInserted > 0) { long endHigh; try (PreparedStatement preparedStatement = connection.prepareStatement(
if (!schemaTable.isTemporary() && numberInserted > 0) { long endHigh; try (PreparedStatement preparedStatement = connection.prepareStatement(