feat: add a filterable count_rows to all the lancedb APIs (#913)

A `count_rows` method that takes a filter was recently added to
`LanceTable`. This PR adds it everywhere else except `RemoteTable` (that
will come soon).
This commit is contained in:
Weston Pace
2024-02-08 09:40:29 -08:00
committed by GitHub
parent f53aace89c
commit d2e71c8b08
11 changed files with 86 additions and 30 deletions

View File

@@ -57,8 +57,8 @@ impl Table {
}
#[napi]
pub async fn count_rows(&self) -> napi::Result<usize> {
self.table.count_rows().await.map_err(|e| {
pub async fn count_rows(&self, filter: Option<String>) -> napi::Result<usize> {
self.table.count_rows(filter).await.map_err(|e| {
napi::Error::from_reason(format!(
"Failed to count rows in table {}: {}",
self.table, e