Class SqlCodecImpl
java.lang.Object
org.aksw.commons.sql.codec.impl.SqlCodecImpl
- All Implemented Interfaces:
SqlCodec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntityCodec<String> protected EntityCodec<String> protected EntityCodec<String> protected EntityCodec<String> protected EntityCodec<String> protected EntityCodec<String> -
Constructor Summary
ConstructorsConstructorDescriptionSqlCodecImpl(EntityCodec<String> aliasCodec, EntityCodec<String> schemaNameCodec, EntityCodec<String> tableNameCodec, EntityCodec<String> columnNameCodec, EntityCodec<String> schemaCodec, EntityCodec<String> stringLiteralCodec) -
Method Summary
Modifier and TypeMethodDescriptionstatic SqlCodecImplcreate(EntityCodec<String> codec) static SqlCodecImplcreate(EntityCodec<String> identifierCodec, EntityCodec<String> stringLiteralCodec) forAlias()Codec for aliases - must never return nullCodec for column names - must never return nullCodec for schema names - must never return nullCodec for string literals - must never return null.Codec for table names - must never return null
-
Field Details
-
aliasCodec
-
schemaNameCodec
-
tableNameCodec
-
columnNameCodec
-
schemaCodec
-
stringLiteralCodec
-
-
Constructor Details
-
SqlCodecImpl
public SqlCodecImpl(EntityCodec<String> aliasCodec, EntityCodec<String> schemaNameCodec, EntityCodec<String> tableNameCodec, EntityCodec<String> columnNameCodec, EntityCodec<String> schemaCodec, EntityCodec<String> stringLiteralCodec)
-
-
Method Details
-
forAlias
Description copied from interface:SqlCodecCodec for aliases - must never return null -
forSchemaName
Description copied from interface:SqlCodecCodec for schema names - must never return null- Specified by:
forSchemaNamein interfaceSqlCodec
-
forTableName
Description copied from interface:SqlCodecCodec for table names - must never return null- Specified by:
forTableNamein interfaceSqlCodec
-
forColumnName
Description copied from interface:SqlCodecCodec for column names - must never return null- Specified by:
forColumnNamein interfaceSqlCodec
-
forStringLiteral
Description copied from interface:SqlCodecCodec for string literals - must never return null. Note that serializing non-string types may still use string escaping as part of the serialization process. E.g. a Date may be serialized as; DATE 'str' http://dev.mysql.com/doc/refman/5.7/en/date-and-time-literals.html- Specified by:
forStringLiteralin interfaceSqlCodec- Returns:
-
create
-
create
public static SqlCodecImpl create(EntityCodec<String> identifierCodec, EntityCodec<String> stringLiteralCodec)
-