Examples of TimeData


Examples of org.hsqldb.types.TimeData

     * @since JDK 1.2 (JDK 1.1.x developers: read the overview for
     *   JDBCResultSet)
     */
    public Time getTime(int columnIndex, Calendar cal) throws SQLException {

        TimeData t = (TimeData) getColumnInType(columnIndex, Type.SQL_TIME);

        if (t == null) {
            return null;
        }

        long millis = DateTimeType.normaliseTime(t.getSeconds()) * 1000;

        if (!resultMetaData.columnTypes[--columnIndex]
                .isDateTimeTypeWithZone()) {
            Calendar calendar = cal == null ? session.getCalendar()
                    : cal;
View Full Code Here

Examples of org.hsqldb.types.TimeData

            long millis = HsqlDateTime.convertMillisFromCalendar(
                HsqlDateTime.tempCalDefault, dateTime.getTime());

            millis = HsqlDateTime.getNormalisedTime(millis);

            return new TimeData((int) millis / 1000, 0, 0);
        }

        return scanner.newTime((String) value);
    }
View Full Code Here

Examples of org.hsqldb.types.TimeData

    }

    protected TimeData readTime(Type type) throws IOException {

        if (type.typeCode == Types.SQL_TIME) {
            return new TimeData(readInt(), readInt(), 0);
        } else {
            return new TimeData(readInt(), readInt(), readInt());
        }
    }
View Full Code Here

Examples of org.hsqldb.types.TimeData

                int seconds =
                    (int) (HsqlDateTime.getNormalisedTime(currentMillis))
                    / 1000;
                int nanos = (int) (currentMillis % 1000) * 1000000;

                currentTime = new TimeData(seconds, nanos, getZoneSeconds());
            }

            return currentTime;
        } else {
            if (localTime == null) {
                int seconds =
                    (int) (HsqlDateTime.getNormalisedTime(
                        currentMillis + getZoneSeconds() * 1000)) / 1000;
                int nanos = (int) (currentMillis % 1000) * 1000000;

                localTime = new TimeData(seconds, nanos, 0);
            }

            return localTime;
        }
    }
View Full Code Here

Examples of org.hsqldb.types.TimeData

                }

                TimestampData date =
                    (TimestampData) Type.SQL_DATE.convertToType(session,
                        data[0], nodes[0].dataType);
                TimeData time = (TimeData) Type.SQL_TIME.convertToType(session,
                    data[1], nodes[1].dataType);

                return new TimestampData(date.getSeconds()
                                         + time.getSeconds(), time.getNanos());
            }
            case FUNC_PI :
                return new Double(Math.PI);

            case FUNC_RAND : {
View Full Code Here

Examples of org.hsqldb.types.TimeData

                String s = token.tokenString;

                read();

                TimeData value    = scanner.newTime(s);
                Type     dataType = scanner.dateTimeType;

                return new ExpressionValue(value, dataType);
            }
            case Tokens.TIMESTAMP : {
View Full Code Here

Examples of org.hsqldb.types.TimeData

     * @since JDK 1.2 (JDK 1.1.x developers: read the overview for
     *   JDBCResultSet)
     */
    public Time getTime(int columnIndex, Calendar cal) throws SQLException {

        TimeData t = (TimeData) getColumnInType(columnIndex, Type.SQL_TIME);

        if (t == null) {
            return null;
        }

        long millis = DateTimeType.normaliseTime(t.getSeconds()) * 1000;

        if (!resultMetaData.columnTypes[--columnIndex]
                .isDateTimeTypeWithZone()) {
            Calendar calendar = cal == null ? session.getCalendar()
                    : cal;
View Full Code Here

Examples of org.hsqldb.types.TimeData

                String s = token.tokenString;

                read();

                TimeData value    = scanner.newTime(s);
                Type     dataType = scanner.dateTimeType;

                return new ExpressionValue(value, dataType);
            }
            case Tokens.TIMESTAMP : {
View Full Code Here

Examples of org.hsqldb.types.TimeData

        if (hasZone) {
            seconds -= zoneSeconds;
        }

        return new TimeData((int) seconds, fraction, (int) zoneSeconds);
    }
View Full Code Here

Examples of org.hsqldb.types.TimeData

            millis = HsqlDateTime.convertMillisFromCalendar(
                tempCalDefault, millis);
            millis = HsqlDateTime.getNormalisedTime(millis);

            return new TimeData((int) (millis / 1000), 0, 0);
        } else {
            return new TimeData(readInt(), readInt(), readInt());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.