File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 11
11
always ensure that you get latest release
12
12
- See examples for more help
13
13
```
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
15
38
* by define structure tag ` db ` now you can pass information to sql.Exec
16
39
* data in ` db ` tag can be recognized by its position or as key=value
17
40
``` golang
You can’t perform that action at this time.
0 commit comments