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

OutputType is not implemented for PrimitiveDateTime #887

Closed
leebenson opened this issue Apr 11, 2022 · 6 comments
Closed

OutputType is not implemented for PrimitiveDateTime #887

leebenson opened this issue Apr 11, 2022 · 6 comments
Labels
bug Something isn't working Stale

Comments

@leebenson
Copy link
Contributor

Expected Behavior

#791 added support for the time feature, implementing (among other types) a scalar value for time::PrimitiveDateTime.

I would expect this to work with sqlx's types::time::PrimitiveDateTime re-export.

Actual Behavior

use sqlx::types::time::PrimitiveDateTime;

#[derive(SimpleObject)]
pub struct SomeObject {
    created_at: PrimitiveDateTime,
    modified_at: PrimitiveDateTime,
}

Yields:

error[E0277]: the trait bound `PrimitiveDateTime: OutputType` is not satisfied
  --> src/db/configuration.rs:10:10
   |
10 | #[derive(SimpleObject)]
   |          ^^^^^^^^^^^^ the trait `OutputType` is not implemented for `PrimitiveDateTime`

Specifications

  • Version: 3.0.37
@leebenson leebenson added the bug Something isn't working label Apr 11, 2022
@leebenson leebenson changed the title OutputType is not implemented for PrimitiveDateTime` OutputType is not implemented for PrimitiveDateTime Apr 11, 2022
@sunli829
Copy link
Collaborator

sunli829 commented Apr 11, 2022

Did you turn on the time feature?

@sunli829
Copy link
Collaborator

sqlx depends on time 0.2😂.

@leebenson
Copy link
Contributor Author

Ah, thanks, I'll see if I can get them to bump 👍🏻

@leebenson
Copy link
Contributor Author

Hmm launchbadge/sqlx#1455

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Aug 28, 2022
@github-actions
Copy link

github-actions bot commented Sep 3, 2022

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants