Use BTreeMap for database execution variables
This commit is contained in:
parent
20c4e03446
commit
b4e2082196
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
}};
|
}};
|
||||||
|
|
Loading…
Reference in a new issue