public void ensureTemporaryVertexTableExist(final String schema, final String label, final Map<String, PropertyType> properties) { Objects.requireNonNull(schema, "Given schema may not be null"); Preconditions.checkState(schema.equals(this.sqlgGraph.getSqlDialect().getPublicSchema()), "Temporary vertices may only be created in the '" + this.sqlgGraph.getSqlDialect().getPublicSchema() + "' schema. Found + " + schema); Objects.requireNonNull(label, "Given label may not be null"); Preconditions.checkArgument(!label.startsWith(VERTEX_PREFIX), "label may not be prefixed with %s", VERTEX_PREFIX); Schema publicSchema = getPublicSchema(); Preconditions.checkState(publicSchema != null, "Schema must be present after calling ensureSchemaExist"); publicSchema.ensureTemporaryVertexTableExist(label, properties); }
public void ensureTemporaryVertexTableExist(final String schema, final String label, final Map<String, PropertyType> properties) { Objects.requireNonNull(schema, "Given schema may not be null"); Preconditions.checkState(schema.equals(this.sqlgGraph.getSqlDialect().getPublicSchema()), "Temporary vertices may only be created in the '" + this.sqlgGraph.getSqlDialect().getPublicSchema() + "' schema. Found + " + schema); Objects.requireNonNull(label, "Given label may not be null"); Preconditions.checkArgument(!label.startsWith(VERTEX_PREFIX), "label may not be prefixed with %s", VERTEX_PREFIX); Schema publicSchema = getPublicSchema(); Preconditions.checkState(publicSchema != null, "Schema must be present after calling ensureSchemaExist"); publicSchema.ensureTemporaryVertexTableExist(label, properties); }
private void afterRollback() { if (this.isSqlWriteLockHeldByCurrentThread()) { getPublicSchema().removeTemporaryTables(); for (Iterator<Map.Entry<String, Schema>> it = this.uncommittedSchemas.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Schema> entry = it.next(); entry.getValue().afterRollback(); it.remove(); } this.uncommittedRemovedSchemas.clear(); for (Schema schema : this.schemas.values()) { schema.afterRollback(); } z_internalSqlWriteUnlock(); } }
private void afterRollback() { if (this.isSqlWriteLockHeldByCurrentThread()) { getPublicSchema().removeTemporaryTables(); for (Iterator<Map.Entry<String, Schema>> it = this.uncommittedSchemas.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Schema> entry = it.next(); entry.getValue().afterRollback(); it.remove(); } this.uncommittedRemovedSchemas.clear(); for (Schema schema : this.schemas.values()) { schema.afterRollback(); } z_internalSqlWriteUnlock(); } }
z_internalTopologyMapWriteLock(); try { getPublicSchema().removeTemporaryTables(); for (Iterator<Map.Entry<String, Schema>> it = this.uncommittedSchemas.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Schema> entry = it.next();
z_internalTopologyMapWriteLock(); try { getPublicSchema().removeTemporaryTables(); for (Iterator<Map.Entry<String, Schema>> it = this.uncommittedSchemas.entrySet().iterator(); it.hasNext(); ) { Map.Entry<String, Schema> entry = it.next();
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); } }
Map<String, PropertyType> properties = this.sqlgGraph.getTopology().getPublicSchema().getTemporaryTable(VERTEX_PREFIX + this.table);
Map<String, PropertyType> properties = this.sqlgGraph.getTopology().getPublicSchema().getTemporaryTable(VERTEX_PREFIX + this.table);
String tmpTableIdentified = Base64.getEncoder().encodeToString(bytes); tmpTableIdentified = Topology.BULK_TEMP_EDGE + tmpTableIdentified; sqlgGraph.getTopology().getPublicSchema().createTempTable(tmpTableIdentified, columns); this._copyInBulkTempEdges(sqlgGraph, SchemaTable.of(out.getSchema(), tmpTableIdentified), uids, outPropertyType, inPropertyType);
propertyColumns = vertexLabel.getProperties(); } else { properties = sqlgGraph.getTopology().getPublicSchema().getTemporaryTable(VERTEX_PREFIX + schemaTable.getTable());
propertyColumns = vertexLabel.getProperties(); } else { properties = sqlgGraph.getTopology().getPublicSchema().getTemporaryTable(VERTEX_PREFIX + schemaTable.getTable());