[#7864] Misleading example about bindings in manual
This commit is contained in:
parent
2c6cbeebb3
commit
503b650ea6
@ -10275,9 +10275,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
@ -18050,9 +18052,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
@ -10514,9 +10514,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
@ -18761,9 +18763,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
@ -10556,9 +10556,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
@ -18805,9 +18807,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
@ -14216,9 +14216,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
@ -9436,9 +9436,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
@ -14863,9 +14865,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
@ -9708,9 +9708,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
@ -15277,9 +15279,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
@ -9932,9 +9932,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
@ -15587,9 +15589,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
@ -10063,9 +10063,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
@ -17485,9 +17487,11 @@ public class PostgresJSONGsonBinding implements Binding<Object, JsonElement> {
|
||||
@Override
|
||||
public void sql(BindingSQLContext<JsonElement> ctx) throws SQLException {
|
||||
// Depending on how you generate your SQL, you may need to explicitly distinguish
|
||||
// between jOOQ generating bind variables or inlined literals. If so, use this check:
|
||||
// ctx.render().paramType() == INLINED
|
||||
ctx.render().visit(DSL.val(ctx.convert(converter()).value())).sql("::json");
|
||||
// between jOOQ generating bind variables or inlined literals.
|
||||
if (ctx.render().paramType() == ParamType.INLINED)
|
||||
ctx.render().visit(DSL.inline(ctx.convert(converter()).value())).sql("::json");
|
||||
else
|
||||
ctx.render().sql("?::json");
|
||||
}
|
||||
|
||||
// Registering VARCHAR types for JDBC CallableStatement OUT parameters
|
||||
|
||||
Loading…
Reference in New Issue
Block a user