queries.rs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. use heed3::RoTxn;
  2. use get_routes::handler;
  3. use helix_db::{field_remapping, identifier_remapping, traversal_remapping, exclude_field};
  4. use helix_db::helix_engine::vector_core::vector::HVector;
  5. use helix_db::{
  6. helix_engine::graph_core::ops::{
  7. g::G,
  8. in_::{in_::InAdapter, in_e::InEdgesAdapter, to_n::ToNAdapter},
  9. out::{from_n::FromNAdapter, out::OutAdapter, out_e::OutEdgesAdapter},
  10. source::{
  11. add_e::{AddEAdapter, EdgeType},
  12. add_n::AddNAdapter,
  13. e_from_id::EFromIdAdapter,
  14. e_from_type::EFromTypeAdapter,
  15. n_from_id::NFromIdAdapter,
  16. n_from_type::NFromTypeAdapter,
  17. n_from_index::NFromIndexAdapter,
  18. },
  19. tr_val::{Traversable, TraversalVal},
  20. util::{
  21. dedup::DedupAdapter, filter_mut::FilterMut,
  22. filter_ref::FilterRefAdapter, range::RangeAdapter, update::UpdateAdapter,
  23. map::MapAdapter, paths::ShortestPathAdapter, props::PropsAdapter, drop::Drop,
  24. },
  25. vectors::{insert::InsertVAdapter, search::SearchVAdapter},
  26. bm25::search_bm25::SearchBM25Adapter,
  27. },
  28. helix_engine::types::GraphError,
  29. helix_gateway::router::router::HandlerInput,
  30. node_matches, props,
  31. protocol::count::Count,
  32. protocol::remapping::ResponseRemapping,
  33. protocol::response::Response,
  34. protocol::traversal_value::TraversalValue,
  35. protocol::{
  36. filterable::Filterable, remapping::Remapping, return_values::ReturnValue, value::Value, id::ID,
  37. },
  38. };
  39. use sonic_rs::{Deserialize, Serialize};
  40. use std::collections::{HashMap, HashSet};
  41. use std::sync::Arc;
  42. use std::time::Instant;
  43. use std::cell::RefCell;
  44. use chrono::{DateTime, Utc};
  45. pub struct NodeUnusedWithTrailingComma {
  46. pub name: String,
  47. pub is_admin: bool,
  48. }
  49. pub struct NodeUnusedWithNoTrailingComma {
  50. pub name: String,
  51. pub is_admin: bool,
  52. }
  53. pub struct EdgeUnusedWithNoProps {
  54. pub from: NodeUnusedWithTrailingComma,
  55. pub to: NodeUnusedWithTrailingComma,
  56. }
  57. pub struct EdgeUnusedWithoutPropsOrTrailingComma {
  58. pub from: NodeUnusedWithTrailingComma,
  59. pub to: NodeUnusedWithTrailingComma,
  60. }
  61. pub struct EdgeUnusedWithPropsAndTrailingComma {
  62. pub from: NodeUnusedWithTrailingComma,
  63. pub to: NodeUnusedWithTrailingComma,
  64. pub prop1: String,
  65. pub prop2: String,
  66. }
  67. pub struct EdgeUnusedWithPropsAndNoTrailingComma {
  68. pub from: NodeUnusedWithTrailingComma,
  69. pub to: NodeUnusedWithTrailingComma,
  70. pub prop1: String,
  71. }