/** * Answer a platform correct string representation of a Calendar, suitable for SQL generation. * The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}. */ protected void appendCalendar(Calendar calendar, Writer writer) throws IOException { if (usesNativeSQL()) { appendInformixCalendar(calendar, writer); } else { super.appendCalendar(calendar, writer); } }
/** * Answer a platform correct string representation of a Timestamp, suitable for SQL generation. * The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}. */ protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException { if (usesNativeSQL()) { appendInformixTimestamp(timestamp, writer); } else { super.appendTimestamp(timestamp, writer); } }
returnValue = resultSet.getString(columnNumber); } else { returnValue = super.getObjectFromResultSet(resultSet, columnNumber, jdbcType, session); returnValue = super.getObjectFromResultSet(resultSet, columnNumber, jdbcType, session);
/** * Answer a platform correct string representation of a Time, suitable for SQL generation. * The time is printed in the ODBC platform independent format {t'hh:mm:ss'}. */ protected void appendTime(java.sql.Time time, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("'"); writer.write(Helper.printTime(time)); writer.write("'"); } else { super.appendTime(time, writer); } }
/** * PUBLIC: * Set the database platform to be Informix. */ public void useInformix() { if (getPlatform().isInformix()) { return; } DatabasePlatform newPlatform = new InformixPlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * Append the field type to a writer unless the field uses an Identity strategy to generate its value. * In this case, the field type 'SERIAL' will be appended later. */ @Override public void printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause) throws IOException { if (!shouldPrintFieldIdentityClause) printFieldTypeSize(writer, field, fieldType); }
fieldTypeMapping.put(Number.class, new FieldTypeDefinition("DECIMAL", 32).setLimits(32, -19, 19)); if (getUseNationalCharacterVaryingTypeForString()) { fieldTypeMapping.put(String.class, new FieldTypeDefinition("NVARCHAR", DEFAULT_VARCHAR_SIZE)); } else {
assert distinctOverride != null; distinctOverride.printsAs("DISTINCT "); // no parens, one space super.initializePlatformOperators(); this.addOperator(this.currentDateOperator()); this.addOperator(this.currentTimeOperator());
/** * Answer a platform correct string representation of a Date, suitable for SQL generation. * Native format: 'yyyy-mm-dd */ @Override protected void appendDate(java.sql.Date date, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("'"); writer.write(Helper.printDate(date)); writer.write("'"); } else { super.appendDate(date, writer); } }
/** * PUBLIC: * Set the database platform to be Informix. */ public void useInformix() { if (getPlatform().isInformix()) { return; } DatabasePlatform newPlatform = new InformixPlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
/** * Append the field type to a writer unless the field uses an Identity strategy to generate its value. * In this case, the field type 'SERIAL' will be appended later. */ @Override public void printFieldTypeSize(Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause) throws IOException { if (!shouldPrintFieldIdentityClause) printFieldTypeSize(writer, field, fieldType); }
fieldTypeMapping.put(Number.class, new FieldTypeDefinition("DECIMAL", 32).setLimits(32, -19, 19)); if (getUseNationalCharacterVaryingTypeForString()) { fieldTypeMapping.put(String.class, new FieldTypeDefinition("NVARCHAR", DEFAULT_VARCHAR_SIZE)); } else {
assert distinctOverride != null; distinctOverride.printsAs("DISTINCT "); // no parens, one space super.initializePlatformOperators(); this.addOperator(this.currentDateOperator()); this.addOperator(this.currentTimeOperator());
/** * Answer a platform correct string representation of a Timestamp, suitable for SQL generation. * The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}. */ @Override protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException { if (usesNativeSQL()) { appendInformixTimestamp(timestamp, writer); } else { super.appendTimestamp(timestamp, writer); } }
/** * Answer a platform correct string representation of a Calendar, suitable for SQL generation. * The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}. */ @Override protected void appendCalendar(Calendar calendar, Writer writer) throws IOException { if (usesNativeSQL()) { appendInformixCalendar(calendar, writer); } else { super.appendCalendar(calendar, writer); } }
/** * Answer a platform correct string representation of a Date, suitable for SQL generation. * Native format: 'yyyy-mm-dd */ @Override protected void appendDate(java.sql.Date date, Writer writer) throws IOException { if (usesNativeSQL()) { writer.write("'"); writer.write(Helper.printDate(date)); writer.write("'"); } else { super.appendDate(date, writer); } }
/** * PUBLIC: * Set the database platform to be Informix. */ public void useInformix() { if (getPlatform().isInformix()) { return; } DatabasePlatform newPlatform = new InformixPlatform(); getPlatform().copyInto(newPlatform); setPlatform(newPlatform); }
returnValue = super.getObjectFromResultSet(resultSet, columnNumber, jdbcType, session);
/** * Answer a platform correct string representation of a Timestamp, suitable for SQL generation. * The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}. */ @Override protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException { if (usesNativeSQL()) { appendInformixTimestamp(timestamp, writer); } else { super.appendTimestamp(timestamp, writer); } }
/** * Answer a platform correct string representation of a Calendar, suitable for SQL generation. * The date is printed in the ODBC platform independent format {d'YYYY-MM-DD'}. */ @Override protected void appendCalendar(Calendar calendar, Writer writer) throws IOException { if (usesNativeSQL()) { appendInformixCalendar(calendar, writer); } else { super.appendCalendar(calendar, writer); } }