MCPcopy Index your code
hub / github.com/jOOQ/jOOQ / SetCommand

Class SetCommand

jOOQ/src/main/java/org/jooq/impl/SetCommand.java:71–177  ·  view source on GitHub ↗

The SET statement.

Source from the content-addressed store, hash-verified

69 * The <code>SET</code> statement.
70 */
71@SuppressWarnings({ "rawtypes", "unused" })
72final class SetCommand
73extends
74 AbstractDDLQuery
75implements
76 QOM.SetCommand
77{
78
79 final Name name;
80 final Param<?> value;
81 final boolean local;
82
83 SetCommand(
84 Configuration configuration,
85 Name name,
86 Param<?> value,
87 boolean local
88 ) {
89 super(configuration);
90
91 this.name = name;
92 this.value = value;
93 this.local = local;
94 }
95
96 // -------------------------------------------------------------------------
97 // XXX: QueryPart API
98 // -------------------------------------------------------------------------
99
100
101
102 private static final Set<SQLDialect> NO_SUPPORT_BIND_VALUES = SQLDialect.supportedBy(POSTGRES);
103
104 @Override
105 public final void accept(Context<?> ctx) {
106 ctx.visit(K_SET);
107
108 if (local)
109 ctx.sql(' ').visit(K_LOCAL);
110
111 ctx.sql(' ').visit(name).sql(" = ").paramTypeIf(ParamType.INLINED, NO_SUPPORT_BIND_VALUES.contains(ctx.dialect()), c -> c.visit(value));
112 }
113
114
115
116 // -------------------------------------------------------------------------
117 // XXX: Query Object Model
118 // -------------------------------------------------------------------------
119
120 @Override
121 public final Name $name() {
122 return name;
123 }
124
125 @Override
126 public final Param<?> $value() {
127 return value;
128 }

Callers

nothing calls this directly

Calls 1

supportedByMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…