(
&self,
collection: &str,
personalization: Option<&std::collections::HashMap<String, f64>>,
damping: Option<f64>,
max_iterations: Option<u32>,
)
| 106 | } |
| 107 | |
| 108 | pub(super) async fn graph_pagerank_impl( |
| 109 | &self, |
| 110 | collection: &str, |
| 111 | personalization: Option<&std::collections::HashMap<String, f64>>, |
| 112 | damping: Option<f64>, |
| 113 | max_iterations: Option<u32>, |
| 114 | ) -> NodeDbResult<Vec<(String, f64)>> { |
| 115 | let sql = crate::graph_dsl::build_pagerank_sql( |
| 116 | collection, |
| 117 | personalization, |
| 118 | damping, |
| 119 | max_iterations, |
| 120 | )?; |
| 121 | let result = self.query(&sql).await?; |
| 122 | crate::graph_dsl::parse_pagerank_rows(&result.columns, &result.rows) |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | /// Build the SQL for `SHOW GRAPH STATS` for the native protocol. Collection |
no test coverage detected