Skip to content

Commit 791325c

Browse files
authored
Expand documentation, with special attention to VARARGS (#18)
1 parent bbddf80 commit 791325c

File tree

2 files changed

+229
-186
lines changed

2 files changed

+229
-186
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,30 @@ The **UncheckedThrow** class uses type erasure to enable client code to throw ch
2626

2727
**DatabaseUtils** provides facilities that enable you to define collections of database queries and stored procedures in an easy-to-execute format.
2828

29+
### Query Collections
30+
2931
Query collections are defined as Java enumerations that implement the `QueryAPI` interface:
3032
* `getQueryStr` - Get the query string for this constant. This is the actual query that's sent to the database.
3133
* `getArgNames` - Get the names of the arguments for this query. This provides diagnostic information if the incorrect number of arguments is specified by the client.
3234
* `getConnection` - Get the connection string associated with this query. This eliminates the need for the client to provide this information.
3335
* `getEnum` - Get the enumeration to which this query belongs. This enables `executeQuery(Class, QueryAPI, Object[])` to retrieve the name of the query's enumerated constant for diagnostic messages.
36+
* ... see the _JavaDoc_ for the `QueryAPI` interface for additional information.
37+
38+
### Stored Procedure Collections
3439

3540
Store procedure collections are defined as Java enumerations that implement the `SProcAPI` interface:
36-
* `getSignature` - Get the signature for this stored procedure object. This defines the name of the stored procedure and the modes of its arguments. If the stored procedure accepts varargs, this will also be indicated.
41+
* `getSignature` - Get the signature for this stored procedure object. This defines the name of the stored procedure and the modes of its arguments. If the stored procedure accepts `varargs`, this will also be indicated (see _JavaDoc_ for details).
3742
* `getArgTypes` - Get the argument types for this stored procedure object.
3843
* `getConnection` - Get the connection string associated with this stored procedure. This eliminates the need for the client to provide this information.
3944
* `getEnum` - Get the enumeration to which this stored procedure belongs. This enables `executeStoredProcedure(Class, SProcAPI, Object[])` to retrieve the name of the stored procedured's enumerated constant for diagnostic messages.
45+
* ... see the _JavaDoc_ for the `SProcAPI` interface for additional information.
46+
47+
### Recommended Implementation Strategy
4048

4149
To maximize usability and configurability, we recommend the following implementation strategy:
4250
* Define your collection as an enumeration:
43-
* Query collections implement `QueryAPI`.
44-
* Stored procedure collections implement `SProcAPI`.
51+
* Query collections implement the `QueryAPI` interface.
52+
* Stored procedure collections implement the `SProcAPI` interface.
4553
* Define each constant:
4654
* (query) Specify a property name and a name for each argument (if any).
4755
* (sproc) Declare the signature and the type for each argument (if any).

0 commit comments

Comments
 (0)