Re: Java 8 Time Configuration

2015-01-28 Thread Lukas Eder
I'm not aware of any published, and open-sourced implementations, although
I know that a couple of users have implemented them.

I think this would be very useful for many users, specifically also because
of the TIMESTAMPTZ support, which is a common question, e.g. also on Stack
Overflow:
http://stackoverflow.com/q/27913735/521799

So, +1 for a https://github.com/rdifalco/jOOQ-tools repository! :)

Cheers
Lukas

2015-01-27 18:27 GMT+01:00 Robert DiFalco robert.difa...@gmail.com:

 Is there a GitHUB project or does anyone have a simple configuration to
 transform all appropriate Postgresql date and time classes to Java 8 Time
 classes? Before I recreated the wheel I figured I'd see if anyone has this
 already.

 I'm guessing something like:
 DATE - LocalData
 TIMESTAMPTZ - Instant?
 TIMESTAMP - Instant

 I guess I would want to set this up for generation? I'd really like to be
 done with java.util.Date, java.sql.Date, and java.sql.Timestamp.

 --
 You received this message because you are subscribed to the Google Groups
 jOOQ User Group group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jooq-user+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups jOOQ 
User Group group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Java 8 Time Configuration

2015-01-28 Thread Robert DiFalco
I think that is what I would need, just a little confused about the 
unknown type talked about in the doc. I assume it doesn't HAVE to be an 
unknown type. So in the case where we might want to convert a Timestamp to 
a ZonedDateTime with special handling of PreparedStatement I would create a 
BindingTimestamp,ZonedDateTime with a custom 
ConverterTimestamp,ZonedDateTime and then in my generator configuration 
specify the binding instead of the Converter?


On Wednesday, January 28, 2015 at 9:24:29 AM UTC-8, Lukas Eder wrote:

 Yes. All JDBC operations are exposed and overridable via your own 
 org.jooq.Binding implementation:

 http://www.jooq.org/doc/latest/manual/code-generation/custom-data-type-bindings

 Let me know if that's what you meant.

 2015-01-28 18:19 GMT+01:00 Robert DiFalco robert@gmail.com 
 javascript::

 When creating a custom type (say I create one to convert TIMESTAMPTZ to 
 java.time.Instant) is there any way I can get to the statements operations? 
 For example, if I created a DATE to java.time.ZonedDateTime I would want to 
 use setTimestamp(int, Timestamp, Calendar) for Callable and Prepared 
 Statements instead of #setTimestamp(int, Timestamp). This is because I need 
 to create a Calendar with the timezone represented in ZonedDateTime in 
 order to write it correctly to the database.

 On Wednesday, January 28, 2015 at 12:27:57 AM UTC-8, Lukas Eder wrote:

 I'm not aware of any published, and open-sourced implementations, 
 although I know that a couple of users have implemented them.

 I think this would be very useful for many users, specifically also 
 because of the TIMESTAMPTZ support, which is a common question, e.g. also 
 on Stack Overflow:
 http://stackoverflow.com/q/27913735/521799

 So, +1 for a https://github.com/rdifalco/jOOQ-tools repository! :)

 Cheers
 Lukas

 2015-01-27 18:27 GMT+01:00 Robert DiFalco robert@gmail.com:

 Is there a GitHUB project or does anyone have a simple configuration to 
 transform all appropriate Postgresql date and time classes to Java 8 Time 
 classes? Before I recreated the wheel I figured I'd see if anyone has this 
 already.

 I'm guessing something like:
 DATE - LocalData
 TIMESTAMPTZ - Instant?
 TIMESTAMP - Instant

 I guess I would want to set this up for generation? I'd really like to 
 be done with java.util.Date, java.sql.Date, and java.sql.Timestamp.

 -- 
 You received this message because you are subscribed to the Google 
 Groups jOOQ User Group group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to jooq-user+...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  -- 
 You received this message because you are subscribed to the Google Groups 
 jOOQ User Group group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to jooq-user+...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups jOOQ 
User Group group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Java 8 Time Configuration

2015-01-28 Thread Robert DiFalco
When creating a custom type (say I create one to convert TIMESTAMPTZ to 
java.time.Instant) is there any way I can get to the statements operations? 
For example, if I created a DATE to java.time.ZonedDateTime I would want to 
use setTimestamp(int, Timestamp, Calendar) for Callable and Prepared 
Statements instead of #setTimestamp(int, Timestamp). This is because I need 
to create a Calendar with the timezone represented in ZonedDateTime in 
order to write it correctly to the database.

On Wednesday, January 28, 2015 at 12:27:57 AM UTC-8, Lukas Eder wrote:

 I'm not aware of any published, and open-sourced implementations, although 
 I know that a couple of users have implemented them.

 I think this would be very useful for many users, specifically also 
 because of the TIMESTAMPTZ support, which is a common question, e.g. also 
 on Stack Overflow:
 http://stackoverflow.com/q/27913735/521799

 So, +1 for a https://github.com/rdifalco/jOOQ-tools repository! :)

 Cheers
 Lukas

 2015-01-27 18:27 GMT+01:00 Robert DiFalco robert@gmail.com 
 javascript::

 Is there a GitHUB project or does anyone have a simple configuration to 
 transform all appropriate Postgresql date and time classes to Java 8 Time 
 classes? Before I recreated the wheel I figured I'd see if anyone has this 
 already.

 I'm guessing something like:
 DATE - LocalData
 TIMESTAMPTZ - Instant?
 TIMESTAMP - Instant

 I guess I would want to set this up for generation? I'd really like to be 
 done with java.util.Date, java.sql.Date, and java.sql.Timestamp.

 -- 
 You received this message because you are subscribed to the Google Groups 
 jOOQ User Group group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to jooq-user+...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups jOOQ 
User Group group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Java 8 Time Configuration

2015-01-28 Thread Lukas Eder
Yes. All JDBC operations are exposed and overridable via your own
org.jooq.Binding implementation:
http://www.jooq.org/doc/latest/manual/code-generation/custom-data-type-bindings

Let me know if that's what you meant.

2015-01-28 18:19 GMT+01:00 Robert DiFalco robert.difa...@gmail.com:

 When creating a custom type (say I create one to convert TIMESTAMPTZ to
 java.time.Instant) is there any way I can get to the statements operations?
 For example, if I created a DATE to java.time.ZonedDateTime I would want to
 use setTimestamp(int, Timestamp, Calendar) for Callable and Prepared
 Statements instead of #setTimestamp(int, Timestamp). This is because I need
 to create a Calendar with the timezone represented in ZonedDateTime in
 order to write it correctly to the database.

 On Wednesday, January 28, 2015 at 12:27:57 AM UTC-8, Lukas Eder wrote:

 I'm not aware of any published, and open-sourced implementations,
 although I know that a couple of users have implemented them.

 I think this would be very useful for many users, specifically also
 because of the TIMESTAMPTZ support, which is a common question, e.g. also
 on Stack Overflow:
 http://stackoverflow.com/q/27913735/521799

 So, +1 for a https://github.com/rdifalco/jOOQ-tools repository! :)

 Cheers
 Lukas

 2015-01-27 18:27 GMT+01:00 Robert DiFalco robert@gmail.com:

 Is there a GitHUB project or does anyone have a simple configuration to
 transform all appropriate Postgresql date and time classes to Java 8 Time
 classes? Before I recreated the wheel I figured I'd see if anyone has this
 already.

 I'm guessing something like:
 DATE - LocalData
 TIMESTAMPTZ - Instant?
 TIMESTAMP - Instant

 I guess I would want to set this up for generation? I'd really like to
 be done with java.util.Date, java.sql.Date, and java.sql.Timestamp.

 --
 You received this message because you are subscribed to the Google
 Groups jOOQ User Group group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to jooq-user+...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 jOOQ User Group group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to jooq-user+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups jOOQ 
User Group group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Java 8 Time Configuration

2015-01-27 Thread Robert DiFalco
Is there a GitHUB project or does anyone have a simple configuration to 
transform all appropriate Postgresql date and time classes to Java 8 Time 
classes? Before I recreated the wheel I figured I'd see if anyone has this 
already.

I'm guessing something like:
DATE - LocalData
TIMESTAMPTZ - Instant?
TIMESTAMP - Instant

I guess I would want to set this up for generation? I'd really like to be 
done with java.util.Date, java.sql.Date, and java.sql.Timestamp.

-- 
You received this message because you are subscribed to the Google Groups jOOQ 
User Group group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.