Feature hasn't been suggested before.
Describe the enhancement you want to request
Policies can become quite cumbersome. A way to add documentation would really help with longer complex policies.
import { explain } from "@drizzle-lab/api/extensions";
import { pgTable, text, jsonb } from "drizzle-orm/pg-core";
export const users = pgTable("users", {
id: text("id").primaryKey(),
name: text("name").notNull(),
metadata: jsonb("metadata").$type<{ role: string }>(),
});
explain(users, {
description: "Users table storing core user information",
columns: {
id: "Unique identifier for the user",
name: "User's full name",
metadata: "Additional user metadata stored as JSON",
},
policies: {
insert_policy: "requires user id"
}
jsonShapes: {
metadata: {
role: "string",
},
},
});
or
explain(insertPolicy, {
description: "requires user id"
});
Feature hasn't been suggested before.
Describe the enhancement you want to request
Policies can become quite cumbersome. A way to add documentation would really help with longer complex policies.
or