In the project I use postgresql as backend database. As the project grows, more data types, such as uuid, jsonb, GEOGRAPHY data types are involved. And I created the new PostgreSQL2Dialect class. Here is the template:
public class PostgreSQL2Dialect extends PostgreSQLDialect {
@Override
public Object overrideDriverTypeConversion(MetaModel mm, String attributeName, Object value) {
// for select statement
return ...;
}
@Override
protected void appendValue(StringBuilder query, Object value, String ... replacements) {
// for insert / update statement
}
}
I found I could not set the PostgreSQL2Dialect into Dialects class. And I could not find any documents for supporting other data types in javalite website. Did I missed something?
A dialect is automatically detected from a URL and cannot be set from outside. The PostgreSQLDialect class already exists. If you want to make changes to it to extend with new functionality, please create a new issue: and propose a new feature there. A dialog with Q/A will follow, and someone (maybe even you? ) will create a pull requersty with a new feature.