Skip to content

Implement trait ToSql for Date and Time #727

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

Closed
wants to merge 1 commit into from

Conversation

SciMind2460
Copy link

I have implemented a ToSql that can be used in rusqlite for SQL data. This can be implemented like this:

conn.execute("INSERT INTO users (name, age, date_of_birth) VALUES (?, ?, ?)", (person.name, person.age, person.date_of_birth))

And also Time, as:

conn.execute("INSERT INTO items (time) VALUES (?)", (item.time))

@SciMind2460 SciMind2460 closed this Feb 5, 2025
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

Successfully merging this pull request may close these issues.

1 participant