--
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 a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/7jqbm98_Ga8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
Thanks, yeah I read that. What I'm doing now seems to work pretty well. I just save the #getSQL and then when I use I do a sqlContext.resultQuery(sql, [values,...]);Are you thinking (a) this isn't a good idea or (b) that I am not saving any cycles? The main reason I'm doing it is that I have several unit tests that (unfortunately) require some timing to check timeouts and such. The first few will usually fail because the first time I construct the query its spends a bit of time creating that query. So whichever test ran first would fail. Extracting the string as above seemed to fix the warm-up issue.
--
Yes, exactly that is the problem. Yeah it was just like three lines of code to move the sqlContext.select to the constructor save it as getSQL in the DAO singleton ctor and then just use resultQuery instead in the actual code. Writing warm-up code was actually more tedious but I'll see if I can do it in a more logical way. These aren't benchmarked unit tests so I'm not using JMH. And I didn't want to have to pre-run queries for every single unit test in this Test class (there is a lot of coverage). It's just some IPC system tests where I had to check out timeouts, waits, errors, and I want to keep the "expect" timeout as short as possible so they will run fast.Thanks for the input.
--
While I have you, is there any simple way to speed up the code generation phase in the maven plugin? mvn test can take a while doing the generation each time. I only have one schema, does adding:<outputSchemaToDefault>true</outputSchemaToDefault>Save me any time? Anything else I can look at? I'm not generating beans or anything like that.
<!--A custom version number that, if available, will be used to assess whether the above<inputSchema/> will need to be regenerated.There are three operation modes for this element:- The value is a class that can be found on the classpath and that implementsorg.jooq.util.SchemaVersionProvider. Such classes must provide a default constructor- The value is a SELECT statement that returns one record with one column. TheSELECT statement may contain a named variable called :schema_name- The value is a constant, such as a Maven propertySchema versions will be generated into the javax.annotation.Generated annotation ongenerated artefacts.--><element name="schemaVersionProvider" type="string" default="" minOccurs="0" maxOccurs="1"/>
<schemaVersionProvider>SELECT :schema_name || '_' || MAX("version") FROM "schema_version"</schemaVersionProvider>
--
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.
<plugin>
<!-- Specify the maven code generator plugin -->
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>3.6.1</version>
<!-- The plugin should hook into the generate goal -->
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<!-- Specify the plugin configuration.
The configuration format is the same as for the standalone code generator -->
<configuration>
<!-- JDBC connection parameters -->
<jdbc>
<driver>org.postgresql.Driver</driver>
<url>${database.jdbcUrl}</url>
<user>${database.username}</user>
<password>${database.password}</password>
</jdbc>
<!-- Generator parameters -->
<generator>
<name>org.jooq.util.JavaGenerator</name>
<database>
<name>org.jooq.util.postgres.PostgresDatabase</name>
<includes>.*</includes>
<inputSchema>public</inputSchema>
<!--<outputSchemaToDefault>true</outputSchemaToDefault>-->
<schemaVersionProvider>SELECT :schema_name || '_' || MAX("version") FROM "schema_version"</schemaVersionProvider> </database>
<target>
<packageName>com.waiapp.server.jooq</packageName>
<directory>src/main/java</directory>
</target>
<generate>
<deprecated>false</deprecated>
</generate>
</generator>
</configuration>
</plugin>
--
You received this message because you are subscribed to a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/7jqbm98_Ga8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.6.1",
"schema version:public_2.2"
},
date = "2015-06-02T14:47:42.719Z",
comments = "This class is generated by jOOQ"
)