Package com.linkedin.venice.sql
Class AvroToSQL
java.lang.Object
com.linkedin.venice.sql.AvroToSQL
Utility intended to convert Avro -> SQL, including DDL and DML statements.
Initially, this implementation may have a DuckDB slant, though in the long-run it should ideally be vendor-neutral.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic PreparedStatementProcessor
deleteProcessor
(org.apache.avro.Schema keySchema) static String
deleteStatement
(String tableName, org.apache.avro.Schema keySchema) static TableDefinition
getTableDefinition
(String tableName, org.apache.avro.Schema keySchema, org.apache.avro.Schema valueSchema, Set<String> columnsToProject, AvroToSQL.UnsupportedTypeHandling unsupportedTypeHandling, boolean primaryKey) static PreparedStatementProcessor
upsertProcessor
(org.apache.avro.Schema keySchema, org.apache.avro.Schema valueSchema, Set<String> columnsToProject) static String
upsertStatement
(String tableName, org.apache.avro.Schema keySchema, org.apache.avro.Schema valueSchema, Set<String> columnsToProject)
-
Method Details
-
getTableDefinition
@Nonnull public static TableDefinition getTableDefinition(@Nonnull String tableName, @Nonnull org.apache.avro.Schema keySchema, @Nonnull org.apache.avro.Schema valueSchema, @Nonnull Set<String> columnsToProject, @Nonnull AvroToSQL.UnsupportedTypeHandling unsupportedTypeHandling, boolean primaryKey) -
upsertStatement
-
upsertProcessor
@Nonnull public static PreparedStatementProcessor upsertProcessor(@Nonnull org.apache.avro.Schema keySchema, @Nonnull org.apache.avro.Schema valueSchema, @Nonnull Set<String> columnsToProject) -
deleteStatement
-
deleteProcessor
@Nonnull public static PreparedStatementProcessor deleteProcessor(@Nonnull org.apache.avro.Schema keySchema)
-