[jOOQ/jOOQ#11061] [jOOQ/jOOQ#11070] [jOOQ/jOOQ#11091] System functions
This commit is contained in:
parent
6c22cc0ea2
commit
97c2c2fb44
@ -37,29 +37,46 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.inline;
|
||||
import static org.jooq.impl.DSL.unquotedName;
|
||||
import static org.jooq.impl.Names.N_CURRENT_CATALOG;
|
||||
import static org.jooq.impl.Names.N_CURRENT_DATABASE;
|
||||
import static org.jooq.impl.Names.N_DB_NAME;
|
||||
import static org.jooq.impl.SQLDataType.VARCHAR;
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.jooq.Context;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
* The <code>CURRENT CATALOG</code> statement.
|
||||
*/
|
||||
final class CurrentCatalog extends AbstractField<String> {
|
||||
@SuppressWarnings({ "unused" })
|
||||
final class CurrentCatalog
|
||||
extends
|
||||
AbstractField<String>
|
||||
{
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = -7273879239726265322L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
CurrentCatalog() {
|
||||
super(N_CURRENT_CATALOG, VARCHAR.notNull());
|
||||
super(
|
||||
N_CURRENT_CATALOG,
|
||||
allNotNull(VARCHAR)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
switch (ctx.family()) {
|
||||
@ -87,4 +104,19 @@ final class CurrentCatalog extends AbstractField<String> {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// The Object API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that instanceof CurrentCatalog) {
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return super.equals(that);
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,32 +37,46 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.inline;
|
||||
import static org.jooq.impl.Keywords.K_CURRENT;
|
||||
import static org.jooq.impl.Keywords.K_CURRENT_SCHEMA;
|
||||
import static org.jooq.impl.Keywords.K_DATABASE;
|
||||
import static org.jooq.impl.Keywords.K_SCHEMA;
|
||||
import static org.jooq.impl.Names.N_CURRENT_SCHEMA;
|
||||
import static org.jooq.impl.Names.N_SCHEMA_NAME;
|
||||
import static org.jooq.impl.Names.N_USER;
|
||||
import static org.jooq.impl.SQLDataType.VARCHAR;
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.jooq.Context;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
* The <code>CURRENT SCHEMA</code> statement.
|
||||
*/
|
||||
final class CurrentSchema extends AbstractField<String> {
|
||||
@SuppressWarnings({ "unused" })
|
||||
final class CurrentSchema
|
||||
extends
|
||||
AbstractField<String>
|
||||
{
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = -7273879239726265322L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
CurrentSchema() {
|
||||
super(N_CURRENT_SCHEMA, VARCHAR.notNull());
|
||||
super(
|
||||
N_CURRENT_SCHEMA,
|
||||
allNotNull(VARCHAR)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
switch (ctx.family()) {
|
||||
@ -122,4 +136,19 @@ final class CurrentSchema extends AbstractField<String> {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// The Object API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that instanceof CurrentSchema) {
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return super.equals(that);
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,27 +37,46 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.Names.N_CURRENTUSER;
|
||||
import static org.jooq.impl.Names.N_CURRENT_USER;
|
||||
import static org.jooq.impl.Names.N_USER;
|
||||
import static org.jooq.impl.SQLDataType.VARCHAR;
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.jooq.Context;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
* The <code>CURRENT USER</code> statement.
|
||||
*/
|
||||
final class CurrentUser extends AbstractField<String> {
|
||||
@SuppressWarnings({ "unused" })
|
||||
final class CurrentUser
|
||||
extends
|
||||
AbstractField<String>
|
||||
{
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = -7273879239726265322L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
CurrentUser() {
|
||||
super(N_CURRENT_USER, VARCHAR.notNull());
|
||||
super(
|
||||
N_CURRENT_USER,
|
||||
allNotNull(VARCHAR)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
switch (ctx.family()) {
|
||||
@ -98,4 +117,19 @@ final class CurrentUser extends AbstractField<String> {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// The Object API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that instanceof CurrentUser) {
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return super.equals(that);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15098,6 +15098,33 @@ public class DSL {
|
||||
return new Coth(number);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>CURRENT_CATALOG</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, POSTGRES, SQLITE })
|
||||
public static Field<String> currentCatalog() {
|
||||
return new CurrentCatalog();
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>CURRENT_SCHEMA</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support
|
||||
public static Field<String> currentSchema() {
|
||||
return new CurrentSchema();
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>CURRENT_USER</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support
|
||||
public static Field<String> currentUser() {
|
||||
return new CurrentUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>DEG</code> function.
|
||||
* <p>
|
||||
@ -26664,37 +26691,6 @@ public class DSL {
|
||||
return new Euler();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX System functions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Get the <code>current_user()</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support
|
||||
public static Field<String> currentUser() {
|
||||
return new CurrentUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>current_schema()</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support
|
||||
public static Field<String> currentSchema() {
|
||||
return new CurrentSchema();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>current_catalog()</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, POSTGRES, SQLITE })
|
||||
public static Field<String> currentCatalog() {
|
||||
return new CurrentCatalog();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX utility API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -65,7 +65,6 @@ extends
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
Rand() {
|
||||
super(
|
||||
N_RAND,
|
||||
|
||||
@ -111,6 +111,5 @@ package org.jooq.impl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user