We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is a table define:
CREATE TABLE `demo` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `char_col` varchar(20) DEFAULT NULL , `text_col` text DEFAULT NULL , PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 )
Then insert data:
insert into demo (null,"1234","1234"); insert into demo (null,"aabbcc","aabbcc");
There is The sea-orm Query Code:
let list = JsonValue::find_by_statement(Statement::from_sql_and_values(DbBackend::MySql,"select * from demo", [])) .all(db) .await .context(DbSnafu)?;
Then we found that the list:
[{ "id":1, "char_col": "1234", "text_col": 1234 }, { "id":2, "char_col": "1234", "text_col": "aabbcc" } ]
The Question is :
Why first row data text_col is a number type,then second text_col row data is String, How can i fix it?
text_col
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is a table define:
Then insert data:
There is The sea-orm Query Code:
Then we found that the list:
The Question is :
Why first row data
text_col
is a number type,then secondtext_col
row data is String, How can i fix it?The text was updated successfully, but these errors were encountered: