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

Give a more specific error message for unsigned types #757

Closed
wants to merge 1 commit into from

Commits on Feb 25, 2017

  1. Give a more specific error message for unsigned types

    We don't yet support these types in MySQL, but the error a user will
    recieve is not terribly helpful, since the type will contain a space so
    the `table!` macro invocation will just have bad tokens.
    
    This gives a more specific error message for unsigned types, as well as
    ensuring that we get a reasonable error for other types would result in
    a bad macro invocation. (I'm not actually aware of any other types which
    have a space, but I'd rather not dig through the entire manual right
    now)
    
    In theory we could exclude unsigned floats from this, since unsigned
    floats aren't actually a thing and that "type" in MySQL is basically
    just a check constraint, but I'd rather hold off and actually represent
    in Diesel that the type is different when we add support for unsigned
    integer types.
    
    Fixes #754.
    sgrif committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    b4266be View commit details
    Browse the repository at this point in the history