mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
fix: satisfy the lint and docs gates for the view APIs
The refusal test's closure never returns, so its response type needed naming; the Python binding's tuple needed a type alias; ruff and biome wanted their formatting; and the generated JS docs needed the four new verbs and the ViewDescription page.
This commit is contained in:
@@ -110,19 +110,20 @@ describe("remote connection", () => {
|
||||
name: "adults",
|
||||
namespace: ["analytics"],
|
||||
query: "SELECT name FROM people",
|
||||
// biome-ignore lint/style/useNamingConvention: the wire field is snake_case
|
||||
default_database: "db",
|
||||
schema: {
|
||||
fields: [{ name: "name", nullable: true, type: { type: "utf8" } }],
|
||||
fields: [
|
||||
{ name: "name", nullable: true, type: { type: "utf8" } },
|
||||
],
|
||||
},
|
||||
}),
|
||||
);
|
||||
},
|
||||
async (db) => {
|
||||
const view = await db.createView(
|
||||
"adults",
|
||||
"SELECT name FROM people",
|
||||
["analytics"],
|
||||
);
|
||||
const view = await db.createView("adults", "SELECT name FROM people", [
|
||||
"analytics",
|
||||
]);
|
||||
expect(view.name).toBe("adults");
|
||||
expect(view.namespacePath).toEqual(["analytics"]);
|
||||
expect(view.query).toBe("SELECT name FROM people");
|
||||
|
||||
@@ -23,7 +23,6 @@ import {
|
||||
validateNonNegativeInteger,
|
||||
} from "./materialized_view";
|
||||
import { Connection as LanceDbConnection } from "./native";
|
||||
import { ViewDescription, viewDescriptionFromNative } from "./view";
|
||||
import type {
|
||||
CreateNamespaceResponse,
|
||||
DescribeNamespaceResponse,
|
||||
@@ -32,6 +31,7 @@ import type {
|
||||
ListNamespacesResponse,
|
||||
ListTablesResponse,
|
||||
} from "./native";
|
||||
import { ViewDescription, viewDescriptionFromNative } from "./view";
|
||||
export type {
|
||||
CreateNamespaceResponse,
|
||||
DescribeNamespaceResponse,
|
||||
|
||||
Reference in New Issue
Block a user