public static CompileContext defaultContextForVersionCode(VersionCode sqliteVersion) { return new CompileContext.Builder(sqliteVersion).build(); }
@Override protected void buildCompileContext(CompileContext.Builder builder) { if (useCustomArgumentBinder) { builder.setArgumentResolver(new DefaultArgumentResolver() { @Override protected boolean canResolveCustomType(Object arg) { return arg instanceof Enum<?>; } @Override protected Object resolveCustomType(Object arg) { return ((Enum<?>) arg).ordinal(); } }); } }
/** * @return a CompileContext that this SquidDatabase should use when compiling SQL statements like {@link Query}, * {@link Insert}, {@link Update}, and {@link Delete}. If necessary, users can customize the returned * CompileContext object by overriding {@link #buildCompileContext(CompileContext.Builder)} to e.g. specify a * different implementation of {@link com.yahoo.squidb.sql.ArgumentResolver} to use. */ public final CompileContext getCompileContext() { CompileContext.Builder builder = new CompileContext.Builder(getSqliteVersion()); buildCompileContext(builder); return builder.build(); }
public static CompileContext defaultContextForVersionCode(VersionCode sqliteVersion) { return new CompileContext.Builder(sqliteVersion).build(); }
/** * @return a CompileContext that this SquidDatabase should use when compiling SQL statements like {@link Query}, * {@link Insert}, {@link Update}, and {@link Delete}. If necessary, users can customize the returned * CompileContext object by overriding {@link #buildCompileContext(CompileContext.Builder)} to e.g. specify a * different implementation of {@link com.yahoo.squidb.sql.ArgumentResolver} to use. */ public final CompileContext getCompileContext() { CompileContext.Builder builder = new CompileContext.Builder(getSqliteVersion()); buildCompileContext(builder); return builder.build(); }