Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10
This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
RegexFlags
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
A lot of configuration elements rely on regular expressions. The most prominent examples are the useful includes and excludes elements. All of these regular expressions use the Java java.util.regex.Pattern
API, with all of its features. The Pattern
API allows for specifying flags and for your configuration convenience, the applied flags are, by default:
-
COMMENTS
: This allows for embedding comments (and, as a side-effect: meaningless whitespace) in regular expressions, which makes them much more readable. -
CASE_INSENSITIVE
: Most schemas are case insensitive, so case-sensitive regular expressions are a bit of a pain, especially in multi-vendor setups, where databases like PostgreSQL (mostly lower case) and Oracle (mostly UPPER CASE) need to be supported simultaneously.
But of course, this default setting may get in your way, for instance if you rely on case sensitive identifiers and whitespace in identifiers a lot, it might be better for you to turn off the above defaults:
<configuration> <generator> <database> <regexFlags>COMMENTS DOTALL</regexFlags> </database> </generator> </configuration>
See the configuration XSD, standalone code generation, and maven code generation for more details.
new org.jooq.meta.jaxb.Configuration() .withGenerator(new Generator() .withDatabase(new Database() .withRegexFlags(List.COMMENTS DOTALL) ) )
See the configuration XSD and programmatic code generation for more details.
import org.jooq.meta.jaxb.* configuration { generator { database { regexFlags = List.COMMENTS DOTALL } } }
See the configuration XSD and gradle code generation for more details.
configuration { generator { database { regexFlags = "COMMENTS DOTALL" } } }
See the configuration XSD and gradle code generation for more details.
generationTool { generator { database { regexFlags = "COMMENTS DOTALL" } } }
See the configuration XSD and gradle code generation for more details.
All the flags available from java.util.regex.Pattern
are available as a whitespace-separated list in standalone XML, or a comma separated list in Maven.
References to this page
- Generator
- Includes and Excludes
- Record Version and Timestamp Fields
- Comments
- Synthetic columns
- Synthetic readonly columns
- Synthetic readonly ROWIDs
- Synthetic identities
- Synthetic defaults
- Synthetic enums
- Synthetic primary keys
- Synthetic unique keys
- Synthetic foreign keys
- Synthetic synonyms
- Matching of forced types
- Inline converters
- Lambda converters
- Auto converters
- Enum converters
- Jackson converters
- JAXB converters
- Fully Qualified Types
- Matcher strategies
- MatcherRule
- Matching catalogs
- Matching schemas
- Matching tables
- Matching fields
- Matching indexes
- Matching primary keys
- Matching unique keys
- Matching foreign keys
- Matching routines
- Matching sequences
- Matching enums
- Matching embeddables
- Matching UDTs
- Matching attributes
- Matcher examples
- Generated records
- Generated POJOs
- Generated DAOs
- Configuration
- Field replacement
- Embedded keys
- Embedded domains
Feedback
Do you have any feedback about this page? We'd love to hear it!