-
Required Element Summary
Required Elements
The keys which are used to compare which rows should be updated
(those are not updated obviously, but inserted if no match was found
The table where you want to update/insert
-
Optional Element Summary
Optional Elements
boolean
If true, the SQL Excetpion will be caught and a
runtime Exception will be thrown, so that the method
signature does not contain a checked exception.
boolean
If true, the db-connection will be opened with a try-with-resources block.
The name of the method in the LazyDb class.
If specified, only the fields specified are updated (still everything
is inserted).
The params of the method.
The names of parameters, which should not be used from
the input object (if useObjectAsInput=true),but appended
as additionalParameters.
If specified, instead of generating the input object type,
this class is used as the parameter type.
boolean
If true (default) we use a single object containing all properties
as input (with typesafe builder).
-
Element Details
-
table
The table where you want to update/insert
- Returns:
-
keys
The keys which are used to compare which rows should be updated
(those are not updated obviously, but inserted if no match was found
- Returns:
-
-
params
The params of the method. Corresponds to the columns in the table,
default to the method parameters
- Returns:
- Default:
- {""}
-
separateParams
The names of parameters, which should not be used from
the input object (if useObjectAsInput=true),but appended
as additionalParameters.
- Default:
- {}
-
-
-
onlyUpdate
If specified, only the fields specified are updated (still everything
is inserted). If empty everything is updated (except for the keys).
- Returns:
- Default:
- {""}
-
methodName
The name of the method in the LazyDb class. Defaults to the annotated
method.
- Returns:
- Default:
- ""
-
manageConnectionWithDatasource
boolean manageConnectionWithDatasource
If true, the db-connection will be opened with a try-with-resources block.
The Connection will be closed after the method
has finished.
If dependencyInjection is enabled,
the DataSource will be injected in the LazyDB
class, otherwise the DataSource will
be the first parameter instead of a connection.
- Default:
- false
-
convertSqlExceptionToRuntimeException
boolean convertSqlExceptionToRuntimeException
If true, the SQL Excetpion will be caught and a
runtime Exception will be thrown, so that the method
signature does not contain a checked exception.
- Returns:
- Default:
- false