2014-10-07 18:46 GMT+02:00 Alok Menghrajani <[email protected]>: > >> > I prefer this not to be strictly tied to backslash escaping, as other > >> > databases (such as PostgreSQL) may implement additional means of > >> > escaping. > >> > >> Do you want a pull request to support PostgreSQL's escaping? > > > > > > Let's first discuss how this could be implemented. It's not a priority > > though, so if you don't have an immediate stake, I'd prefer not to > include > > it in jOOQ 3.5.0 anymore. > > I don't think it's a priority, just something we may potentially need > in the future. > > > We certainly should. I really wonder if there is any way through standard > > JDBC API to access the NO_BACKSLASH_ESCAPES property. I haven't found it > in > > Connection.getClientInfo(), nor in > INFORMATION_SCHEMA.SESSION_VARIABLES... I > > also don't find it in @@SESSION.sql_mode > > If you do SELCT @@GLOBAL.sql_mode, @@SESSION.sql_mode, you can see if > NO_BACKSLASH_ESCAPES is set either at a connection level or globally. > If you don't find it in either of these two strings, then you know > it's not set. Unfortunately, this requires a roundtrip to the > database. > > I don't know if you can read the value from > > http://bazaar.launchpad.net/~mysql/connectorj/5.1/view/head:/src/com/mysql/jdbc/ConnectionImpl.java#L3554
Yes, I've seen that. That's another option. In particular, the JDBC driver will already cache these values. Unfortunately, that's vendor-specific API, and thus needs to be accessed via reflection. Besides, depending on the connection pool being used, the "raw connection" might not be available to jOOQ. We've had such issues with Oracle's JDBC driver, which we need to access in order to create array objects. -- 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/d/optout.
