-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[macros] improve handling of SQLX_OFFLINE #868
Copy link
Copy link
Closed
Labels
E-easyenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersmacros
Description
Currently, the macros expect SQLX_OFFLINE to equal "true" (case insensitive) to force offline mode. This is fine, but environment variables that can switch something on or off typically also accept 0 as false and 1 as true.
This should be a relatively easy fix, the code is here: https://github.com/launchbadge/sqlx/blob/master/sqlx-macros/src/query/mod.rs#L40
I would also prefer to use str::eq_ascii_ignore_case here to save an allocation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
E-easyenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersmacros