Use BTreeMap for database execution variables

This commit is contained in:
Tobie Morgan Hitchcock 2022-06-20 02:13:28 +01:00
parent 20c4e03446
commit b4e2082196
2 changed files with 3 additions and 3 deletions

View file

@ -1,8 +1,8 @@
use crate::ctx::Context; use crate::ctx::Context;
use crate::sql::value::Value; use crate::sql::value::Value;
use std::collections::HashMap; use std::collections::BTreeMap;
pub type Variables = Option<HashMap<String, Value>>; pub type Variables = Option<BTreeMap<String, Value>>;
pub(crate) trait Attach { pub(crate) trait Attach {
fn attach(self, ctx: Context) -> Context; fn attach(self, ctx: Context) -> Context;

View file

@ -1,6 +1,6 @@
macro_rules! map { macro_rules! map {
($($k:expr => $v:expr),* $(,)?) => {{ ($($k:expr => $v:expr),* $(,)?) => {{
let mut m = ::std::collections::HashMap::new(); let mut m = ::std::collections::BTreeMap::new();
$(m.insert($k, $v);)+ $(m.insert($k, $v);)+
m m
}}; }};