/** Get the data type considering a known max value */ protected final DataTypeDefinition getDataTypeForMAX_VAL( SchemaDefinition schema, BigInteger value) { DataTypeDefinition type; if (BigInteger.valueOf(Byte.MAX_VALUE).compareTo(value) >= 0) { type = new DefaultDataTypeDefinition( this, schema, SQLDataType.NUMERIC.getTypeName(), 0, 2, 0, false, false); } else if (BigInteger.valueOf(Short.MAX_VALUE).compareTo(value) >= 0) { type = new DefaultDataTypeDefinition( this, schema, SQLDataType.NUMERIC.getTypeName(), 0, 4, 0, false, false); } else if (BigInteger.valueOf(Integer.MAX_VALUE).compareTo(value) >= 0) { type = new DefaultDataTypeDefinition( this, schema, SQLDataType.NUMERIC.getTypeName(), 0, 9, 0, false, false); } else if (BigInteger.valueOf(Long.MAX_VALUE).compareTo(value) >= 0) { type = new DefaultDataTypeDefinition( this, schema, SQLDataType.NUMERIC.getTypeName(), 0, 18, 0, false, false); } else { type = new DefaultDataTypeDefinition( this, schema, SQLDataType.NUMERIC.getTypeName(), 0, 38, 0, false, false); } return type; }
/** This class is generated by jOOQ. */ @javax.annotation.Generated( value = {"http://www.jooq.org", "jOOQ version:3.5.2"}, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({"all", "unchecked", "rawtypes"}) public class Verdicts extends org.jooq.impl.TableImpl<org.ng200.openolympus.jooq.tables.records.VerdictsRecord> { private static final long serialVersionUID = 4413314; /** The reference instance of <code>public.verdicts</code> */ public static final org.ng200.openolympus.jooq.tables.Verdicts VERDICTS = new org.ng200.openolympus.jooq.tables.Verdicts(); /** The class holding records for this type */ @Override public java.lang.Class<org.ng200.openolympus.jooq.tables.records.VerdictsRecord> getRecordType() { return org.ng200.openolympus.jooq.tables.records.VerdictsRecord.class; } /** The column <code>public.verdicts.id</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Long> ID = createField( "id", org.jooq.impl.SQLDataType.BIGINT.nullable(false).defaulted(true), this, ""); /** The column <code>public.verdicts.additional_information</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.String> ADDITIONAL_INFORMATION = createField( "additional_information", org.jooq.impl.SQLDataType.VARCHAR.length(255), this, ""); /** The column <code>public.verdicts.cpu_time</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Long> CPU_TIME = createField("cpu_time", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, ""); /** The column <code>public.verdicts.is_viewable_when_contest_running</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Boolean> IS_VIEWABLE_WHEN_CONTEST_RUNNING = createField( "is_viewable_when_contest_running", org.jooq.impl.SQLDataType.BOOLEAN.nullable(false), this, ""); /** The column <code>public.verdicts.maximum_score</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.math.BigDecimal> MAXIMUM_SCORE = createField( "maximum_score", org.jooq.impl.SQLDataType.NUMERIC.precision(19, 2), this, ""); /** The column <code>public.verdicts.memory_peak</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Long> MEMORY_PEAK = createField("memory_peak", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, ""); /** The column <code>public.verdicts.path_to_test</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.String> PATH_TO_TEST = createField("path_to_test", org.jooq.impl.SQLDataType.VARCHAR.length(255), this, ""); /** The column <code>public.verdicts.real_time</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Long> REAL_TIME = createField("real_time", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, ""); /** The column <code>public.verdicts.score</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.math.BigDecimal> SCORE = createField("score", org.jooq.impl.SQLDataType.NUMERIC.precision(19, 2), this, ""); /** The column <code>public.verdicts.status</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Integer> STATUS = createField("status", org.jooq.impl.SQLDataType.INTEGER, this, ""); /** The column <code>public.verdicts.tested</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Boolean> TESTED = createField("tested", org.jooq.impl.SQLDataType.BOOLEAN.nullable(false), this, ""); /** The column <code>public.verdicts.unauthorised_syscall</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Long> UNAUTHORISED_SYSCALL = createField( "unauthorised_syscall", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, ""); /** The column <code>public.verdicts.solution_id</code>. */ public final org.jooq.TableField< org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Long> SOLUTION_ID = createField("solution_id", org.jooq.impl.SQLDataType.BIGINT, this, ""); /** Create a <code>public.verdicts</code> table reference */ public Verdicts() { this("verdicts", null); } /** Create an aliased <code>public.verdicts</code> table reference */ public Verdicts(java.lang.String alias) { this(alias, org.ng200.openolympus.jooq.tables.Verdicts.VERDICTS); } private Verdicts( java.lang.String alias, org.jooq.Table<org.ng200.openolympus.jooq.tables.records.VerdictsRecord> aliased) { this(alias, aliased, null); } private Verdicts( java.lang.String alias, org.jooq.Table<org.ng200.openolympus.jooq.tables.records.VerdictsRecord> aliased, org.jooq.Field<?>[] parameters) { super(alias, org.ng200.openolympus.jooq.Public.PUBLIC, aliased, parameters, ""); } /** {@inheritDoc} */ @Override public org.jooq.Identity<org.ng200.openolympus.jooq.tables.records.VerdictsRecord, java.lang.Long> getIdentity() { return org.ng200.openolympus.jooq.Keys.IDENTITY_VERDICTS; } /** {@inheritDoc} */ @Override public org.jooq.UniqueKey<org.ng200.openolympus.jooq.tables.records.VerdictsRecord> getPrimaryKey() { return org.ng200.openolympus.jooq.Keys.VERDICTS_PKEY; } /** {@inheritDoc} */ @Override public java.util.List< org.jooq.UniqueKey<org.ng200.openolympus.jooq.tables.records.VerdictsRecord>> getKeys() { return java.util.Arrays .<org.jooq.UniqueKey<org.ng200.openolympus.jooq.tables.records.VerdictsRecord>>asList( org.ng200.openolympus.jooq.Keys.VERDICTS_PKEY); } /** {@inheritDoc} */ @Override public java.util.List< org.jooq.ForeignKey<org.ng200.openolympus.jooq.tables.records.VerdictsRecord, ?>> getReferences() { return java.util.Arrays .<org.jooq.ForeignKey<org.ng200.openolympus.jooq.tables.records.VerdictsRecord, ?>>asList( org.ng200.openolympus.jooq.Keys.VERDICTS__FK_9VEP15EYJKCBKN2IQXANLYE16); } /** {@inheritDoc} */ @Override public org.ng200.openolympus.jooq.tables.Verdicts as(java.lang.String alias) { return new org.ng200.openolympus.jooq.tables.Verdicts(alias, this); } /** Rename this table */ public org.ng200.openolympus.jooq.tables.Verdicts rename(java.lang.String name) { return new org.ng200.openolympus.jooq.tables.Verdicts(name, null); } }