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

Fix network types #360

Merged
merged 1 commit into from
Jun 26, 2022
Merged

Conversation

ikrivosheev
Copy link
Member

PR Info

Query example:

let addr = Ipv4Network::new(Ipv4Addr::new(127, 0, 0, 1), 8);
let query = Query::select()
        .column(Network::Ip)
        .from(Network::Table)
        .and_where(Expr::col(Network::Ip).eq(addr))
        .to_string(PostgresQueryBuilder),

println!("{}", query);
// Before: SELECT "ip" FROM "network" WHERE "ip" = 127.0.0.1/8 - ERROR!
// After: SELECT "ip" FROM "network" WHERE "ip" = '127.0.0.1/8' - OK

Fixes

  • Fix network types convert to string
  • Remove unneeded escape character

@ikrivosheev ikrivosheev requested review from tyt2y3 and billy1624 June 25, 2022 18:33
@ikrivosheev ikrivosheev changed the title Fix print network types Fix network types Jun 25, 2022
@tyt2y3 tyt2y3 merged commit 9f0e333 into SeaQL:master Jun 26, 2022
@tyt2y3
Copy link
Member

tyt2y3 commented Jun 26, 2022

Thank you!

@ikrivosheev ikrivosheev deleted the fix/network_types_to_string branch June 26, 2022 11:01
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.

2 participants