Skip to content
New issue

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

Insert String value to Integer column #1143

Closed
looly opened this issue Jul 13, 2024 · 1 comment
Closed

Insert String value to Integer column #1143

looly opened this issue Jul 13, 2024 · 1 comment

Comments

@looly
Copy link

looly commented Jul 13, 2024

Describe the bug

When I use JDBC to build a PreparedStatement and use setObject method to insert to database, a String value can insert to a Integer column.

To Reproduce

I use Hutool wrap the sql and insert to db.

final Db db = Db.of(DbConfig.of().setUrl("jdbc:sqlite:d:/test/test.db"));
db.insert(Entity.of("user").set("age", "testStr2"));

and age column is a INTEGER column.

image

image

Expected behavior
A clear and concise description of what you expected to happen.

Logs

Environment (please complete the following information):

  • OS: Windows 11
  • CPU x86_64
  • sqlite-jdbc version 3.46.0.0

Additional context

@gotson
Copy link
Collaborator

gotson commented Jul 15, 2024

SQLite doesn't care about types.

@gotson gotson closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@gotson gotson removed the triage label Jul 15, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants