You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ikingme
1,"update tbl_person set gender = true where id = 28", just execute this sql in the database;
2,“update tbl_person set gender = ? where id = ?", true, 28, need bind parameter to ?,it need compare the datatype..
I have a table with column tinyint in my database. In my code the field is bool in a struct. I can't update the value to the tinyint column.
table:
CREATE TABLE "TBL_PERSON"
(
"ID" BIGINT IDENTITY(1,1) NOT NULL,
"NAME" VARCHAR(384) DEFAULT ''
NOT NULL,
"GENDER" TINYINT DEFAULT 0
NOT NULL,
"AGE" INT DEFAULT 1
NOT NULL
);
struct:
type TblPerson struct {
Id uint32
orm:"column(id)";pk
Name string
Gender bool
Age int
}
code:
The text was updated successfully, but these errors were encountered: