Skip to content

Commit a47bc99

Browse files
committed
Small improvements.
1 parent 2aa75ec commit a47bc99

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The SprocWrapper provides and efficient and easy-to-use mechanimism for translat
1212

1313
Here are some examples!
1414

15-
Using a basic types:
15+
Using basic types:
1616

1717
```java
1818
@SProcService
@@ -26,8 +26,8 @@ public interface CustomerSProcService {
2626
CREATE FUNCTION register_customer(p_name text, p_email text)
2727
RETURNS int AS
2828
$$
29-
INSERT INTO z_data.customer(c_email, c_gender)
30-
VALUES (p_email, p_gender)
29+
INSERT INTO z_data.customer(c_name, c_email)
30+
VALUES (p_name, p_email)
3131
RETURNING c_id
3232
$$
3333
LANGUAGE 'sql' SECURITY DEFINER;
@@ -63,9 +63,11 @@ $$
6363
LANGUAGE 'sql' SECURITY DEFINER;
6464
```
6565

66-
SprocWrapper supports the following data types:
66+
Please check [unit/integration tests](tree/master/src/test/java/de/zalando/sprocwrapper) for more examples.
6767

68-
| Database | Java |
68+
The following table shows the mapping between a database type and a Java type:
69+
70+
| Database | Java Type |
6971
| ---------------- | ------------------------------------------------- |
7072
| smallint | int |
7173
| integer | int |
@@ -84,14 +86,11 @@ SprocWrapper supports the following data types:
8486
| time | java.sql.Timestamp |
8587
| boolean | boolean |
8688
| enum | java.lang.Enum |
87-
| array | java.util.List/java.util.Set |
89+
| array | java.util.List / java.util.Set |
8890
| hstore | java.util.Map<java.lang.String, java.lang.String> |
8991

90-
9192
Note: Sprocwrapper doesn't support functions returning arrays as a single output. If one wants to return a collection, please return a SETOF instead.
9293

93-
Please check unit/integration tests for more examples.
94-
9594
Prerequisites
9695
-------------
9796

@@ -155,3 +154,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
155154
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
156155
See the License for the specific language governing permissions and
157156
limitations under the License.
157+

0 commit comments

Comments
 (0)