
org.fastnate.generator.dialect.PostgresDialect Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastnate-generator Show documentation
Show all versions of fastnate-generator Show documentation
The Fastnate Offline SQL Generator
package org.fastnate.generator.dialect;
/**
* Handles PostgreSQL specific conversions.
*
* @see PostgreSQL - Online manuals
*/
public final class PostgresDialect extends GeneratorDialect {
@Override
protected void addQuotedCharacter(final StringBuilder result, final char c) {
if (c == 0) {
throw new IllegalArgumentException("PostgreSQL does not support '\\0' characters");
}
super.addQuotedCharacter(result, c);
}
@Override
public String convertBooleanValue(final boolean value) {
return value ? "true" : "false";
}
@Override
public String createBlobExpression(final byte[] blob) {
return createHexBlobExpression("decode('", blob, "', 'hex')");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy