MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / execute_limit

Method execute_limit

graphlite/src/exec/executor.rs:6125–6141  ·  view source on GitHub ↗

Execute a limit operation

(
        &self,
        count: usize,
        offset: Option<usize>,
        input_rows: Vec<Row>,
    )

Source from the content-addressed store, hash-verified

6123
6124 /// Execute a limit operation
6125 fn execute_limit(
6126 &self,
6127 count: usize,
6128 offset: Option<usize>,
6129 input_rows: Vec<Row>,
6130 ) -> Result<Vec<Row>, ExecutionError> {
6131 let offset_val = offset.unwrap_or(0);
6132
6133 // Skip offset rows and take only count rows
6134 let limited_rows: Vec<Row> = input_rows
6135 .into_iter()
6136 .skip(offset_val)
6137 .take(count)
6138 .collect();
6139
6140 Ok(limited_rows)
6141 }
6142
6143 /// Execute full-text search operation
6144 fn node_matches_properties(

Callers 1

Calls 1

skipMethod · 0.45

Tested by

no test coverage detected