diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index be8942d82a..a40fd3559f 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -7938,6 +7938,53 @@ public class DSL { return dsl().dropSequenceIfExists(sequence); } + /** + * Create a new DSL truncate statement. + *
+ * Unlike {@link Delete} factory methods in the {@link DSLContext} API, this
+ * creates an unattached, and thus not directly renderable or executable
+ * DELETE statement.
+ *
+ * Example: + *
+ *
+ *
+ * import static org.jooq.impl.DSL.*;
+ *
+ * // [...]
+ *
+ * truncate(table);
+ *
TRUNCATE
+ * Most dialects implement the TRUNCATE statement. If it is not
+ * supported, it is emulated using an equivalent DELETE
+ * statement. This is particularly true for these dialects:
+ *
TRUNCATE
+ * Some statements also support extensions of the TRUNCATE
+ * statement, such as Postgres:
+ *
+ *
+ *
+ * truncate(table)
+ * .restartIdentity()
+ * .cascade()
+ *
+ * These vendor-specific extensions are currently not emulated for those
+ * dialects that do not support them natively.
+ *
+ * @see DSLContext#truncate(String)
+ */
+ @Support
+ public static TruncateIdentityStep