pull
parent
d82bbbd29b
commit
0bbec5c895
@ -1,2 +1,4 @@
|
|||||||
pub(crate) mod attr;
|
pub(crate) mod attr;
|
||||||
|
pub(crate) mod pull;
|
||||||
|
pub(crate) mod query;
|
||||||
pub(crate) mod triple;
|
pub(crate) mod triple;
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
use crate::data::attr::{Attribute, AttributeCardinality};
|
||||||
|
use crate::data::keyword::Keyword;
|
||||||
|
|
||||||
|
pub(crate) type PullSpecs = Vec<PullSpec>;
|
||||||
|
|
||||||
|
pub(crate) enum PullSpec {
|
||||||
|
None,
|
||||||
|
PullAll,
|
||||||
|
Recurse(Keyword),
|
||||||
|
Attr(AttrPullSpec),
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) struct AttrPullSpec {
|
||||||
|
pub(crate) attr: Attribute,
|
||||||
|
pub(crate) reverse: bool,
|
||||||
|
pub(crate) name: Keyword,
|
||||||
|
pub(crate) cardinality: AttributeCardinality,
|
||||||
|
pub(crate) take: Option<usize>,
|
||||||
|
pub(crate) nested: PullSpecs,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(crate) struct RecursePullSpec {
|
||||||
|
pub(crate) parent: Keyword,
|
||||||
|
pub(crate) max_depth: Option<usize>,
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
use crate::data::keyword::Keyword;
|
||||||
|
use crate::transact::pull::PullSpec;
|
||||||
|
|
||||||
|
pub(crate) struct QuerySpec {
|
||||||
|
find: Vec<(Keyword, PullSpec)>,
|
||||||
|
rules: (),
|
||||||
|
input: (),
|
||||||
|
order: (),
|
||||||
|
limit: Option<usize>,
|
||||||
|
offset: Option<usize>,
|
||||||
|
}
|
Loading…
Reference in New Issue