[#8331] Add DSLContext.truncateTable() as an alias for truncate()
This commit is contained in:
parent
e3fb522416
commit
7e3fa0efd3
@ -9705,6 +9705,30 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
@Support({ CUBRID, FIREBIRD, H2, HSQLDB, POSTGRES })
|
||||
DropSequenceFinalStep dropSequenceIfExists(Sequence<?> sequence);
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
* Synonym for {@link #truncateTable(String)}
|
||||
*/
|
||||
@Support
|
||||
TruncateIdentityStep<Record> truncate(String table);
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
* Synonym for {@link #truncateTable(Name)}
|
||||
*/
|
||||
@Support
|
||||
TruncateIdentityStep<Record> truncate(Name table);
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
* Synonym for {@link #truncateTable(Table)}
|
||||
*/
|
||||
@Support
|
||||
<R extends Record> TruncateIdentityStep<R> truncate(Table<R> table);
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
@ -9744,7 +9768,7 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* @see #truncate(Table)
|
||||
*/
|
||||
@Support
|
||||
TruncateIdentityStep<Record> truncate(String table);
|
||||
TruncateIdentityStep<Record> truncateTable(String table);
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
@ -9785,7 +9809,7 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* @see #truncate(Name)
|
||||
*/
|
||||
@Support
|
||||
TruncateIdentityStep<Record> truncate(Name table);
|
||||
TruncateIdentityStep<Record> truncateTable(Name table);
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
@ -9824,7 +9848,7 @@ public interface DSLContext extends Scope , AutoCloseable {
|
||||
* dialects that do not support them natively.
|
||||
*/
|
||||
@Support
|
||||
<R extends Record> TruncateIdentityStep<R> truncate(Table<R> table);
|
||||
<R extends Record> TruncateIdentityStep<R> truncateTable(Table<R> table);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX Access control
|
||||
|
||||
@ -7940,6 +7940,36 @@ public class DSL {
|
||||
return dsl().dropSequenceIfExists(sequence);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
* Synonym for {@link #truncateTable(String)}
|
||||
*/
|
||||
@Support
|
||||
public static TruncateIdentityStep<Record> truncate(String table) {
|
||||
return truncateTable(table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
* Synonym for {@link #truncateTable(Name)}
|
||||
*/
|
||||
@Support
|
||||
public static TruncateIdentityStep<Record> truncate(Name table) {
|
||||
return truncateTable(table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
* Synonym for {@link #truncateTable(Table)}
|
||||
*/
|
||||
@Support
|
||||
public static <R extends Record> TruncateIdentityStep<R> truncate(Table<R> table) {
|
||||
return truncateTable(table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DSL truncate statement.
|
||||
* <p>
|
||||
@ -7983,8 +8013,8 @@ public class DSL {
|
||||
* @see DSLContext#truncate(String)
|
||||
*/
|
||||
@Support
|
||||
public static TruncateIdentityStep<Record> truncate(String table) {
|
||||
return dsl().truncate(table);
|
||||
public static TruncateIdentityStep<Record> truncateTable(String table) {
|
||||
return dsl().truncateTable(table);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -8030,8 +8060,8 @@ public class DSL {
|
||||
* @see DSLContext#truncate(Name)
|
||||
*/
|
||||
@Support
|
||||
public static TruncateIdentityStep<Record> truncate(Name table) {
|
||||
return dsl().truncate(table);
|
||||
public static TruncateIdentityStep<Record> truncateTable(Name table) {
|
||||
return dsl().truncateTable(table);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -8077,8 +8107,8 @@ public class DSL {
|
||||
* @see DSLContext#truncate(Table)
|
||||
*/
|
||||
@Support
|
||||
public static <R extends Record> TruncateIdentityStep<R> truncate(Table<R> table) {
|
||||
return dsl().truncate(table);
|
||||
public static <R extends Record> TruncateIdentityStep<R> truncateTable(Table<R> table) {
|
||||
return dsl().truncateTable(table);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -3549,16 +3549,31 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri
|
||||
|
||||
@Override
|
||||
public final TruncateIdentityStep<Record> truncate(String table) {
|
||||
return truncate(name(table));
|
||||
return truncateTable(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final TruncateIdentityStep<Record> truncate(Name table) {
|
||||
return truncate(table(table));
|
||||
return truncateTable(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends Record> TruncateIdentityStep<R> truncate(Table<R> table) {
|
||||
return truncateTable(table);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final TruncateIdentityStep<Record> truncateTable(String table) {
|
||||
return truncateTable(name(table));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final TruncateIdentityStep<Record> truncateTable(Name table) {
|
||||
return truncateTable(table(table));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends Record> TruncateIdentityStep<R> truncateTable(Table<R> table) {
|
||||
return new TruncateImpl<R>(configuration(), table);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user