Skip to content

Vendor Specific SQL

Konstantin Triger edited this page Aug 10, 2019 · 4 revisions

Out-of-the-box FluentJPA provides mappings of extensions and vendor specific functionality for 4 most popular database vendors: Oracle, SQL Server, PostgreSQL and MySQL. Their specific functionality is declared in 4 classes (see Setup):

  • co.streamx.fluent.SQL.MySQL.SQL
  • co.streamx.fluent.SQL.Oracle.SQL
  • co.streamx.fluent.SQL.PostgreSQL.SQL
  • co.streamx.fluent.SQL.TransactSQL.SQL

In addition, some vendors require or support some specific SQL "style". Possible styles, supported by FluentJPA are declared in co.streamx.fluent.notation.Capability enum. There is a per vendor method registerVendorCapabilities() that pre-registers these capabilities.

By default, FluentJPA generates a "universal" SQL, working with all vendors. Thus calling registerVendorCapabilities() is optional, though recommended. Only when using vendor specific capabilities you are required to registerVendorCapabilities(), since otherwise the extensions might not work correctly.