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
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
createTableStatement
(String tableName, org.apache.avro.Schema avroSchema, Set<String> primaryKeyColumns, AvroToSQL.UnsupportedTypeHandling unsupportedTypeHandling) static BiConsumer<org.apache.avro.generic.GenericRecord,
PreparedStatement> upsertProcessor
(org.apache.avro.Schema recordSchema) static String
upsertStatement
(String tableName, org.apache.avro.Schema recordSchema)
-
Method Details
-
createTableStatement
@Nonnull public static String createTableStatement(@Nonnull String tableName, @Nonnull org.apache.avro.Schema avroSchema, @Nonnull Set<String> primaryKeyColumns, @Nonnull AvroToSQL.UnsupportedTypeHandling unsupportedTypeHandling) -
upsertStatement
-
upsertProcessor
@Nonnull public static BiConsumer<org.apache.avro.generic.GenericRecord,PreparedStatement> upsertProcessor(@Nonnull org.apache.avro.Schema recordSchema)
-