Top Description Methods
com.ziclix.python.sql

public Interface DateFactory

Known Direct Implementers
com.ziclix.python.sql.JavaDateFactory
Imports
org.python.core.PyObject

Provide an extensible way to create dates for zxJDBC.
Author
brian zimmer

Method Summary

Modifier and TypeMethod and Description
public PyObject

Returns:

date as PyObject
Date
(int
to set
year
,
int
to set
month
,
int
to set
day
)

This function constructs an object holding a date value.

public PyObject

Returns:

PyObject
DateFromTicks
(long
number of seconds since the epoch
ticks
)

This function constructs an object holding a date value from the given ticks value (number of seconds since the epoch; see the documentation of the standard Python time module for details).

public PyObject

Returns:

time as PyObject
Time
(int
to set
hour
,
int
to set
minute
,
int
to set
second
)

This function constructs an object holding a time value.

public PyObject

Returns:

PyObject
TimeFromTicks
(long
number of seconds since the epoch
ticks
)

This function constructs an object holding a time value from the given ticks value (number of seconds since the epoch; see the documentation of the standard Python time module for details).

public PyObject

Returns:

time stamp as PyObject
Timestamp
(int
to set
year
,
int
to set
month
,
int
to set
day
,
int
to set
hour
,
int
to set
minute
,
int
to set
second
)

This function constructs an object holding a time stamp value.

public PyObject

Returns:

PyObject
TimestampFromTicks
(long
number of seconds since the epoch
ticks
)

This function constructs an object holding a time stamp value from the given ticks value (number of seconds since the epoch; see the documentation of the standard Python time module for details).

Method Detail

Dateback to summary
public PyObject Date(int year, int month, int day)

This function constructs an object holding a date value.

Parameters
year:int

to set

month:int

to set

day:int

to set

Returns:PyObject

date as PyObject

DateFromTicksback to summary
public PyObject DateFromTicks(long ticks)

This function constructs an object holding a date value from the given ticks value (number of seconds since the epoch; see the documentation of the standard Python time module for details).

Note

The DB API 2.0 spec calls for time in seconds since the epoch while the Java Date object returns time in milliseconds since the epoch. This module adheres to the python API and will therefore use time in seconds rather than milliseconds, so adjust any Java code accordingly.

Parameters
ticks:long

number of seconds since the epoch

Returns:PyObject

PyObject

Timeback to summary
public PyObject Time(int hour, int minute, int second)

This function constructs an object holding a time value.

Parameters
hour:int

to set

minute:int

to set

second:int

to set

Returns:PyObject

time as PyObject

TimeFromTicksback to summary
public PyObject TimeFromTicks(long ticks)

This function constructs an object holding a time value from the given ticks value (number of seconds since the epoch; see the documentation of the standard Python time module for details).

Note

The DB API 2.0 spec calls for time in seconds since the epoch while the Java Date object returns time in milliseconds since the epoch. This module adheres to the python API and will therefore use time in seconds rather than milliseconds, so adjust any Java code accordingly.

Parameters
ticks:long

number of seconds since the epoch

Returns:PyObject

PyObject

Timestampback to summary
public PyObject Timestamp(int year, int month, int day, int hour, int minute, int second)

This function constructs an object holding a time stamp value.

Parameters
year:int

to set

month:int

to set

day:int

to set

hour:int

to set

minute:int

to set

second:int

to set

Returns:PyObject

time stamp as PyObject

TimestampFromTicksback to summary
public PyObject TimestampFromTicks(long ticks)

This function constructs an object holding a time stamp value from the given ticks value (number of seconds since the epoch; see the documentation of the standard Python time module for details).

Note

The DB API 2.0 spec calls for time in seconds since the epoch while the Java Date object returns time in milliseconds since the epoch. This module adheres to the python API and will therefore use time in seconds rather than milliseconds, so adjust any Java code accordingly.

Parameters
ticks:long

number of seconds since the epoch

Returns:PyObject

PyObject