Skip to content

Commit 2f9d33c

Browse files
committed
update README.md
1 parent bd7f7bc commit 2f9d33c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,30 @@
1111
always ensure that you get latest release
1212
- See examples for more help
1313
```
14-
### version 2.7.0: Use golang structure as an oracle (input) parameters
14+
### version 2.7.2: Use golang structure as an oracle (output) parameters
15+
all rules used for input will be required for output plus:
16+
* structure should be passed as a pointer
17+
* tag direction is required to be output or inout. size is used with
18+
some types like strings
19+
* each field will be translated to a parameter as follows
20+
```
21+
number mapped to sql.NullFloat64
22+
varchar mapped to sql.NullString
23+
nvarchar mapped to sql.NullNVarchar
24+
date mapped to sql.NullTime
25+
timestamp mapped to NullTimeStamp
26+
timestamptz mapped to NullTimeStampTZ
27+
raw mapped to []byte
28+
clob mapped to Clob
29+
nclob mapped to NClob
30+
blob mapped to Blob
31+
```
32+
all fields that support driver.Valuer interface will be passed as it is
33+
* data assigned back to structure fields after exec finish when a null
34+
value read then field value will set to `reflect.Zero`
35+
* `examples/struct_pars/main.go` contain full example for reading and
36+
writing struct pars
37+
### version 2.7.1: Use golang structure as an oracle (input) parameters
1538
* by define structure tag `db` now you can pass information to sql.Exec
1639
* data in `db` tag can be recognized by its position or as key=value
1740
```golang

0 commit comments

Comments
 (0)