wbwdb - v1.2.10
    正在准备搜索索引...

    类 SQLExecutor

    索引
    • 参数

      • 可选existingTables: Map<string, Row[]>
      • 可选existingSchemas: Map<
            string,
            Map<string, { name: string; notNull: boolean; defaultValue: unknown }>,
        >
      • 可选existingRls: Map<
            string,
            {
                enabled: boolean;
                forced: boolean;
                policies: {
                    name: string;
                    cmd: string;
                    permissive: boolean;
                    roles: string[];
                    using: unknown;
                    withCheck: unknown;
                }[];
            },
        >
      • 可选existingHooks: Map<string, TableHook[]>

      返回 SQLExecutor

    • Set auth context from Auth module

      参数

      • ctx:
            | {
                userId: string;
                username: string;
                roles: string[];
                permissions: string[];
            }
            | null

      返回 void

    • Get auth context

      返回
          | {
              userId: string;
              username: string;
              roles: string[];
              permissions: string[];
          }
          | null

    • Execute a parsed SQL statement

      参数

      • stmt: SQLNode
      • 可选params: unknown[]
      • 可选authContext:
            | {
                userId: string;
                username: string;
                roles: string[];
                permissions: string[];
            }
            | null

      返回 QueryResult

    • Check if current session is superuser

      返回 boolean

    • Get a specific table as an array of Row

      参数

      • name: string

      返回 Row[]

    • Sync SQL tables back to wbwdb DBTable objects

      参数

      返回 void