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:
Jack Ye
2026-09-22 10:06:01 -07:00
parent aeea54ff48
commit 24628a8bb9
9 changed files with 183 additions and 17 deletions
+7 -6
View File
@@ -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");
+1 -1
View File
@@ -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,