Hello, Thanks for proofreading the jOOQ manual
2013/2/17 Mark Anderson <[email protected]>: > the 2.6 manual has this source example: > > // Congratulate the author by email: > if (author.getMailSent()) { > sendCongratulationMail(author); > > // Don't send the mail twice, so store that flag in the database > author.setMailSent(true); > author.store(); > } > > but shouldn't that be: > if (! author.getMailSent()) { That is a pretty dumb example, true. Instead of fixing the if condition, it should be completely changed. I have registered #2215 for this https://github.com/jOOQ/jOOQ/issues/2215 > ... > > and anyway where did mail_sent come from since it isn't in the starting > example schema? A few examples go beyond the example schema. The example schema section refers to such examples as follows: "More entities, types (e.g. UDT's, ARRAY types, ENUM types, etc), stored procedures and packages are introduced for specific examples" Taken from: http://www.jooq.org/doc/2.6/manual-single-page/#sample-database > later on in 3.4.1.6 it looks like there is double html escaping at work: > > Result<Record> result = > create.select().from(POSTS).fetch(); Yes, thanks for the hint. #2219: https://github.com/jOOQ/jOOQ/issues/2219 > regarding section 5.5 - none of that statement re-use is going to work if > the connection is > closed, right? Isn't that specified by the JDBC standard? Any closed > connection will automatically > close any of its statements, right? The Connection.close() method isn't very explicit about this: http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#close() It just says: "Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released." The PreparedStatement Javadoc doesn't mention much about an explicit link to the creating Connection. >From experience, I'd say, closing the connection will also "deconnect" all of the PreparedStatements that are kept open by jOOQ. This doesn't mean that the PreparedStatements themselves are closed, too. Some JDBC implementations might leak resources, if you don't call jOOQ's Query.close() to explicitly close the underlying PreparedStatement Thanks again for reporting these things. Feel free to indicate any other flaws you might find on this list, or as github issues. Cheers Lukas -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
