executeOnce

Talks about: , and

Generate methods that are executed once with the given parameters

The ordinary method: one call, one execution, the parameters you passed. It is what you want for almost every statement, which is why it is on.

Turning it off for a statement leaves only its batch method, which is worth doing for a statement that is never sensibly run for a single row — a bulk import, say. A statement with both turned off generates nothing, and YoSQL warns rather than leaving you to notice the missing method.

The method is called what the statement is called.

Configuration Options

Option: ’true'

The default:

public final class TenantRepository {

    public int insertTenant(final UUID id, final String slug) {
        // ... rest of generated code
    }

}

Option: ‘false’

Only the batch method is generated:

public final class TenantRepository {

    public int[] insertTenantBatch(final UUID[] id, final String[] slug) {
        // ... rest of generated code
    }

}

Also in this group: annotations , catchAndRethrow , createConnection , description , executeBatch , generateConnectionOverloads , generateResultRowType , injectConverter , name , parameters , repository , resultRowColumns , resultRowConverter , resultRowType , returningMode , throwOnMultipleResults , type , validateSchema , vendor , writesReturnUpdateCount .

Front Matter

In order to configure this option, place the following code in the front matter of your SQL statement:

-- executeOnce: true
SELECT  something
FROM    your_database_schema
WHERE   some_column = :some_value