use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.
the class AtlasJsonModelFactory method createJsonDocument.
/**
* Creates a JSON Document.
* @return JSON Document
*/
public static JsonDocument createJsonDocument() {
JsonDocument jsonDocument = new JsonDocument();
jsonDocument.setFields(new Fields());
return jsonDocument;
}
use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.
the class AtlasXmlModelFactory method createXmlDocument.
/**
* Creates the XML Document.
* @return XML Document
*/
public static XmlDocument createXmlDocument() {
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.setFields(new Fields());
return xmlDocument;
}
use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project atlasmap by atlasmap.
the class AtlasKafkaConnectModelFactory method createKafkaConnectDocument.
/**
* Creates the Kafka Connect Document.
* @return Document
*/
public static KafkaConnectDocument createKafkaConnectDocument() {
KafkaConnectDocument kafkaConnectDocument = new KafkaConnectDocument();
kafkaConnectDocument.setFields(new Fields());
return kafkaConnectDocument;
}
use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project jOOQ by jOOQ.
the class FirebirdDatabase method getRoutines0.
@Override
protected List<RoutineDefinition> getRoutines0() throws SQLException {
Rdb$procedures p = RDB$PROCEDURES.as("p");
Rdb$functions fu = RDB$FUNCTIONS.as("fu");
Rdb$functionArguments fa = RDB$FUNCTION_ARGUMENTS.as("fa");
Rdb$fields fi = RDB$FIELDS.as("fi");
return create().select(p.RDB$PROCEDURE_NAME.trim(), inline(null, VARCHAR).as("t"), inline(null, SMALLINT).as("p"), inline(null, SMALLINT).as("s")).from(p).where(p.RDB$PROCEDURE_TYPE.eq((short) 2)).union(is30() ? select(fu.RDB$FUNCTION_NAME.trim(), FIELD_TYPE(fi).as("t"), coalesce(CHARACTER_LENGTH(fi), fi.RDB$FIELD_PRECISION).as("p"), FIELD_SCALE(fi).as("s")).from(fu).leftAntiJoin(p).on(fu.RDB$FUNCTION_NAME.eq(p.RDB$PROCEDURE_NAME)).join(fa).on(fu.RDB$FUNCTION_NAME.eq(fa.RDB$FUNCTION_NAME)).leftOuterJoin(fi).on(fa.RDB$FIELD_SOURCE.eq(fi.RDB$FIELD_NAME)).where(fa.RDB$ARGUMENT_POSITION.eq(inline((short) 0))) : select(inline(""), inline(""), inline((short) 0), inline((short) 0)).where(falseCondition())).orderBy(1).collect(mapping(r -> new FirebirdRoutineDefinition(getSchemata().get(0), r.get(0, String.class), r.get(1, String.class), r.get(2, Integer.class), r.get(3, Integer.class)), Collectors.<RoutineDefinition>toList()));
}
use of org.jooq.util.firebird.rdb.tables.Rdb$fields in project jOOQ by jOOQ.
the class FirebirdRoutineDefinition method init0.
@Override
protected void init0() throws SQLException {
Rdb$procedureParameters p = RDB$PROCEDURE_PARAMETERS.as("p");
Rdb$functionArguments a = RDB$FUNCTION_ARGUMENTS.as("a");
Rdb$fields f = RDB$FIELDS.as("f");
int i = 0;
for (Record record : returnValue == null ? create().select(p.RDB$PARAMETER_NUMBER, p.RDB$PARAMETER_TYPE, p.RDB$PARAMETER_NAME.trim().as(p.RDB$PARAMETER_NAME), FIELD_TYPE(f).as("FIELD_TYPE"), CHARACTER_LENGTH(f).as("CHAR_LEN"), f.RDB$FIELD_PRECISION, FIELD_SCALE(f).as("FIELD_SCALE"), DSL.bitOr(p.RDB$NULL_FLAG.nvl((short) 0), f.RDB$NULL_FLAG.nvl((short) 0)).as(p.RDB$NULL_FLAG), p.RDB$DEFAULT_SOURCE).from(p).leftOuterJoin(f).on(p.RDB$FIELD_SOURCE.eq(f.RDB$FIELD_NAME)).where(p.RDB$PROCEDURE_NAME.eq(getName())).orderBy(p.RDB$PARAMETER_TYPE.desc(), p.RDB$PARAMETER_NUMBER.asc()) : create().select(a.RDB$ARGUMENT_POSITION.as(p.RDB$PARAMETER_NUMBER), inline(0).as(p.RDB$PARAMETER_TYPE), a.RDB$ARGUMENT_NAME.trim().as(p.RDB$PARAMETER_NAME), FIELD_TYPE(f).as("FIELD_TYPE"), CHARACTER_LENGTH(f).as("CHAR_LEN"), f.RDB$FIELD_PRECISION, FIELD_SCALE(f).as("FIELD_SCALE"), DSL.bitOr(a.RDB$NULL_FLAG.nvl((short) 0), f.RDB$NULL_FLAG.nvl((short) 0)).as(p.RDB$NULL_FLAG), a.RDB$DEFAULT_SOURCE).from(a).leftOuterJoin(f).on(a.RDB$FIELD_SOURCE.eq(f.RDB$FIELD_NAME)).where(a.RDB$FUNCTION_NAME.eq(getName())).and(a.RDB$ARGUMENT_POSITION.gt(inline((short) 0))).orderBy(a.RDB$ARGUMENT_POSITION)) {
DataTypeDefinition type = new DefaultDataTypeDefinition(getDatabase(), getSchema(), record.get("FIELD_TYPE", String.class), record.get("CHAR_LEN", short.class), record.get(f.RDB$FIELD_PRECISION), record.get("FIELD_SCALE", Integer.class), record.get(p.RDB$NULL_FLAG) == 0, record.get(p.RDB$DEFAULT_SOURCE));
ParameterDefinition parameter = new DefaultParameterDefinition(this, record.get(p.RDB$PARAMETER_NAME), i++, type);
addParameter(record.get(p.RDB$PARAMETER_TYPE, int.class).equals(0) ? InOutDefinition.IN : InOutDefinition.OUT, parameter);
}
}
Aggregations