io.github.matteobertozzi.easerinsights.jdbc.sqlx.Sql Maven / Gradle / Ivy
The newest version!
package io.github.matteobertozzi.easerinsights.jdbc.sqlx;
public interface Sql {
record InsertIntoQuery(String tableName, Enum>[] fields) {}
InsertSqlBuilder insertInto(String tableName, Enum>... fields);
UpdateSqlBuilder update(String tableName, Enum>... fields);
DeleteSqlBuilder deleteFrom(String tableName);
SelectSqlBuilder selectFrom(String tableName);
interface InsertSqlBuilder {
}
record SqlUpdateDef(String tableName, Enum>[] fields, String sql) {}
interface UpdateSqlBuilder {
SqlExpr where();
SqlUpdateDef build();
}
interface DeleteSqlBuilder {
SqlExpr where();
}
interface SelectSqlBuilder {
SqlExpr where();
}
@FunctionalInterface
interface SqlNameBuilder {
StringBuilder add(StringBuilder sql, String name);
}
}