Skip to content

Commit 2f3925f

Browse files
committed
Updated README
1 parent 088fbd7 commit 2f3925f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,14 @@ This is experimental at this stage.
118118
119119
### ColumnWarnings
120120
121+
If the struct doesn't match the SQL returned or generated. The library will spit out a warning that there is a mis-match, and then ignore it. You can turn of this warning with
122+
123+
```go
124+
MySQL.ColumnWarnings = true
125+
P, _ := MySQL.QuerySingleStruct[InsertPerson]("select * from Test WHERE ID = ?", lastInsertedID)
126+
```
127+
If there any fields defined in InsertPerson that don't match the record set, a warning is raised.
128+
129+
121130
### ShowSQL
122131

0 commit comments

Comments
 (0)