pqb 0.61.11 → 0.61.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +68 -4
- package/dist/index.js +70 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
3
|
import { MaybeArray as MaybeArray$1 } from 'rollup';
|
|
4
|
-
import { RecordOptionalString as RecordOptionalString$1, Query as Query$1 } from 'pqb';
|
|
4
|
+
import { RecordOptionalString as RecordOptionalString$1, DefaultPrivileges as DefaultPrivileges$1, Query as Query$1 } from 'pqb';
|
|
5
5
|
|
|
6
6
|
type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
7
7
|
type MaybeArray<T> = T | T[];
|
|
@@ -4289,7 +4289,7 @@ declare class QueryStorage {
|
|
|
4289
4289
|
withOptions<Result>(this: PickQueryQAndInternal, options: StorageOptions, cb: () => Promise<Result>): Promise<Result>;
|
|
4290
4290
|
}
|
|
4291
4291
|
|
|
4292
|
-
|
|
4292
|
+
interface DbRole {
|
|
4293
4293
|
name: string;
|
|
4294
4294
|
super?: boolean;
|
|
4295
4295
|
inherit?: boolean;
|
|
@@ -4301,7 +4301,8 @@ type DbRole = {
|
|
|
4301
4301
|
validUntil?: Date;
|
|
4302
4302
|
bypassRls?: boolean;
|
|
4303
4303
|
config?: RecordOptionalString$1;
|
|
4304
|
-
|
|
4304
|
+
defaultPrivileges?: DefaultPrivileges$1.SchemaConfig[];
|
|
4305
|
+
}
|
|
4305
4306
|
|
|
4306
4307
|
interface QueryInternal<SinglePrimaryKey = any, UniqueColumns = any, UniqueColumnNames = any, UniqueColumnTuples = any, UniqueConstraints = any> extends QueryInternalColumnNameToKey {
|
|
4307
4308
|
runtimeDefaultColumns?: string[];
|
|
@@ -7673,6 +7674,69 @@ declare class MergeQueryMethods {
|
|
|
7673
7674
|
merge<T extends MergeQueryArg, Q extends MergeQueryArg>(this: T, q: Q): MergeQuery<T, Q>;
|
|
7674
7675
|
}
|
|
7675
7676
|
|
|
7677
|
+
declare namespace DefaultPrivileges {
|
|
7678
|
+
export type ObjectType = (typeof DEFAULT_PRIVILEGE.OBJECT_TYPES)[number];
|
|
7679
|
+
export interface Privilege {
|
|
7680
|
+
Table: (typeof DEFAULT_PRIVILEGE.PRIVILEGES.TABLE)[number];
|
|
7681
|
+
Sequence: (typeof DEFAULT_PRIVILEGE.PRIVILEGES.SEQUENCE)[number];
|
|
7682
|
+
Function: (typeof DEFAULT_PRIVILEGE.PRIVILEGES.FUNCTION)[number];
|
|
7683
|
+
Type: (typeof DEFAULT_PRIVILEGE.PRIVILEGES.TYPE)[number];
|
|
7684
|
+
Schema: (typeof DEFAULT_PRIVILEGE.PRIVILEGES.SCHEMA)[number];
|
|
7685
|
+
LargeObject: (typeof DEFAULT_PRIVILEGE.PRIVILEGES.LARGE_OBJECT)[number];
|
|
7686
|
+
}
|
|
7687
|
+
interface ObjectSetting<T> {
|
|
7688
|
+
privileges?: T[];
|
|
7689
|
+
grantablePrivileges?: T[];
|
|
7690
|
+
}
|
|
7691
|
+
export interface SchemaTargetConfig {
|
|
7692
|
+
owner?: string;
|
|
7693
|
+
schema: string;
|
|
7694
|
+
all?: boolean;
|
|
7695
|
+
allGrantable?: boolean;
|
|
7696
|
+
tables?: ObjectSetting<Privilege['Table']>;
|
|
7697
|
+
sequences?: ObjectSetting<Privilege['Sequence']>;
|
|
7698
|
+
functions?: ObjectSetting<Privilege['Function']>;
|
|
7699
|
+
types?: ObjectSetting<Privilege['Type']>;
|
|
7700
|
+
}
|
|
7701
|
+
export interface GlobalTargetConfig {
|
|
7702
|
+
owner?: string;
|
|
7703
|
+
schema?: never;
|
|
7704
|
+
all?: boolean;
|
|
7705
|
+
allGrantable?: boolean;
|
|
7706
|
+
tables?: ObjectSetting<Privilege['Table']>;
|
|
7707
|
+
sequences?: ObjectSetting<Privilege['Sequence']>;
|
|
7708
|
+
functions?: ObjectSetting<Privilege['Function']>;
|
|
7709
|
+
types?: ObjectSetting<Privilege['Type']>;
|
|
7710
|
+
schemas?: ObjectSetting<Privilege['Schema']>;
|
|
7711
|
+
largeObjects?: ObjectSetting<Privilege['LargeObject']>;
|
|
7712
|
+
}
|
|
7713
|
+
export interface SupportedDefaultPrivileges {
|
|
7714
|
+
OBJECT_TYPES: string[];
|
|
7715
|
+
PRIVILEGES: {
|
|
7716
|
+
TABLE: string[];
|
|
7717
|
+
SEQUENCE: string[];
|
|
7718
|
+
FUNCTION: string[];
|
|
7719
|
+
TYPE: string[];
|
|
7720
|
+
SCHEMA: string[];
|
|
7721
|
+
LARGE_OBJECT?: string[];
|
|
7722
|
+
};
|
|
7723
|
+
}
|
|
7724
|
+
export type SchemaConfig = SchemaTargetConfig | GlobalTargetConfig;
|
|
7725
|
+
export { };
|
|
7726
|
+
}
|
|
7727
|
+
declare const DEFAULT_PRIVILEGE: {
|
|
7728
|
+
OBJECT_TYPES: readonly ["TABLES", "SEQUENCES", "FUNCTIONS", "TYPES", "SCHEMAS", "LARGE_OBJECTS"];
|
|
7729
|
+
PRIVILEGES: {
|
|
7730
|
+
TABLE: readonly ["ALL", "SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER", "MAINTAIN"];
|
|
7731
|
+
SEQUENCE: readonly ["ALL", "USAGE", "SELECT", "UPDATE"];
|
|
7732
|
+
FUNCTION: readonly ["ALL", "EXECUTE"];
|
|
7733
|
+
TYPE: readonly ["ALL", "USAGE"];
|
|
7734
|
+
SCHEMA: readonly ["ALL", "USAGE", "CREATE"];
|
|
7735
|
+
LARGE_OBJECT: readonly ["ALL", "SELECT", "UPDATE"];
|
|
7736
|
+
};
|
|
7737
|
+
};
|
|
7738
|
+
declare function getSupportedDefaultPrivileges(version: number): DefaultPrivileges.SupportedDefaultPrivileges;
|
|
7739
|
+
|
|
7676
7740
|
declare const getPrimaryKeys: (q: Query) => string[];
|
|
7677
7741
|
declare const requirePrimaryKeys: (q: Query, message: string) => string[];
|
|
7678
7742
|
|
|
@@ -11287,4 +11351,4 @@ declare const testTransaction: {
|
|
|
11287
11351
|
close(arg: Arg): Promise<void>;
|
|
11288
11352
|
};
|
|
11289
11353
|
|
|
11290
|
-
export { type AdapterBase, type AdapterConfigBase, type AdapterConfigConnectRetry, type AdapterTransactionOptions, type AddQueryDefaults, type AdditionalDateData, type AdditionalNumberData, type AdditionalStringData, AfterCommitError, type AfterCommitErrorFulfilledResult, type AfterCommitErrorHandler, type AfterCommitErrorRejectedResult, type AfterCommitErrorResult, type AfterCommitHook, type AfterCommitStandaloneHook, type AfterHook, type AggregateOptions, type ArgWithBeforeAndBeforeSet, ArrayColumn, type ArrayColumnValue, type ArrayData, type ArrayMethodsData, type ArrayMethodsDataForBaseColumn, type AsFn, type AsQueryArg, type AsyncState, type AsyncTransactionState, type BaseNumberData, type BatchSql, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, type ChangeCountArg, CidrColumn, CircleColumn, CitextColumn, type Code, type Codes, Column, type ColumnFromDbParams, ColumnRefExpression, type ColumnSchemaConfig, type ColumnSchemaGetterColumns, type ColumnSchemaGetterTableClass, type ColumnToCodeCtx, type ColumnTypeSchemaArg, type ColumnsByType, ColumnsShape, ComputedColumn, type ComputedColumns, type ComputedColumnsFromOptions, type ComputedMethods, type ComputedOptionsConfig, type ComputedOptionsFactory, type CreateBelongsToData, type CreateColumn, type CreateCtx, type CreateData, type CreateFromMethodNames, type CreateManyFromMethodNames, type CreateManyMethodsNames, type CreateMethodsNames, type CreateRelationsData, type CreateRelationsDataOmittingFKeys, type CreateResult, type CreateSelf, type CteArgsOptions, type CteHooks, type CteItem, type CteOptions, CteQuery, type CteQueryBuilder, type CteRecursiveOptions, type CteResult, type CteSqlResult, type CteTableHook, type CteTableHooks, CustomTypeColumn, DateBaseColumn, DateColumn, type DateColumnData, type DateColumnInput, DateTimeBaseClass, DateTimeTzBaseClass, Db, type DbDomainArg, type DbDomainArgRecord, type DbExtension, type DbOptions, type DbOptionsWithAdapter, type DbResult, type DbRole, type DbSharedOptions, type DbSqlMethod, type DbSqlQuery, type DbStructureDomainsMap, type DbTableConstructor, type DbTableOptionScopes, type DbTableOptions, DecimalColumn, type DecimalColumnData, type DefaultColumnTypes, type DefaultSchemaConfig, type DelayedRelationSelect, type DeleteArgs, type DeleteMethodsNames, type DeleteResult, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, type DynamicSQLArg, type EmptyObject, type EmptyTuple, EnumColumn, Expression, type ExpressionChain, type ExpressionData, type ExpressionOutput, ExpressionTypeMethod, FnExpression, type FnExpressionArgs, type FnExpressionArgsPairs, type FnExpressionArgsValue, type FnUnknownToUnknown, type FromArg, FromMethods, type FromQuerySelf, type FromResult, type GeneratorIgnore, type GroupArgs, type HandleResult, type HasBeforeAndBeforeSet, type HasCteHooks, type HasHookSelect, type HasTableHook, type HavingItem, type HookAction, type HookSelect, type HookSelectArg, type HookSelectValue, type IdentityColumn, InetColumn, IntegerBaseColumn, IntegerColumn, IntervalColumn, type IsQueries, type IsQuery, type IsSubQuery, type IsolationLevel, JSONColumn, JSONTextColumn, type JoinArgToQuery, type JoinArgs, type JoinCallback, type JoinCallbackArgs, type JoinFirstArg, type JoinItem, type JoinItemArgs, type JoinLateralResult, type JoinQueryBuilder, type JoinQueryMethod, type JoinResult, type JoinResultFromArgs, type JoinResultRequireMain, type JoinResultSelectable, type JoinValueDedupItem, type JoinedParsers, type JoinedShapes, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MaybeArray, type MaybePromise, type MergeQuery, type MergeQueryArg, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, type MoveMutativeQueryToCte, type NoPrimaryKeyOption, type NonUniqDataItem, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, type NumberColumnData, type NumericColumns, type OnConflictMerge, OnConflictQueryBuilder, type OnConflictSet, type OnConflictTarget, OnMethods, type Operator, type OperatorToSQL, Operators, type OperatorsAny, type OperatorsArray, type OperatorsBoolean, type OperatorsDate, type OperatorsJson, type OperatorsNumber, type OperatorsOrdinalText, type OperatorsText, type OperatorsTime, type OrCreateArg, OrExpression, type OrExpressionArg, OrchidOrmError, OrchidOrmInternalError, type OrderArg, type OrderItem, type OrderTsQueryConfig, type Over, PathColumn, type PickQueryAs, type PickQueryBaseQuery, type PickQueryColumTypes, type PickQueryDataShapeAndJoinedShapes, type PickQueryDataShapeAndJoinedShapesAndAliases, type PickQueryDefaultSelect, type PickQueryDefaults, type PickQueryHasSelect, type PickQueryHasSelectHasWhereResultReturnType, type PickQueryHasSelectResult, type PickQueryHasSelectResultReturnType, type PickQueryHasSelectResultShapeAsRelations, type PickQueryHasWhere, type PickQueryInputType, type PickQueryInternal, type PickQueryIsSubQuery, type PickQueryMetaSelectableResultRelationsWindowsColumnTypes, type PickQueryMetaSelectableResultRelationsWithDataReturnTypeShapeAs, type PickQueryQ, type PickQueryQAndBaseQuery, type PickQueryQAndInternal, type PickQueryRelationQueries, type PickQueryRelations, type PickQueryRelationsWithData, type PickQueryResult, type PickQueryResultAs, type PickQueryResultAsRelations, type PickQueryResultColumnTypes, type PickQueryResultRelationsWithDataReturnTypeShape, type PickQueryResultReturnType, type PickQueryResultReturnTypeUniqueColumns, type PickQueryResultUniqueColumns, type PickQueryReturnType, type PickQueryScopes, type PickQuerySelectable, type PickQuerySelectableColumnTypes, type PickQuerySelectableRelations, type PickQuerySelectableRelationsResultReturnType, type PickQuerySelectableResult, type PickQuerySelectableResultAs, type PickQuerySelectableResultInputTypeAs, type PickQuerySelectableResultRelationsWindows, type PickQuerySelectableResultRelationsWithDataReturnType, type PickQuerySelectableResultRelationsWithDataReturnTypeShapeAs, type PickQuerySelectableResultWindows, type PickQuerySelectableReturnType, type PickQuerySelectableShape, type PickQuerySelectableShapeAs, type PickQuerySelectableShapeRelationsReturnTypeIsSubQuery, type PickQuerySelectableShapeRelationsWithData, type PickQuerySelectableShapeRelationsWithDataAs, type PickQuerySelectableShapeRelationsWithDataAsResultReturnType, type PickQueryShape, type PickQueryShapeAsRelations, type PickQueryShapeResultReturnTypeSinglePrimaryKey, type PickQueryShapeResultSinglePrimaryKey, type PickQueryShapeSinglePrimaryKey, type PickQuerySinglePrimaryKey, type PickQueryTable, type PickQueryTableMetaShapeTableAs, type PickQueryThen, type PickQueryTsQuery, type PickQueryUniqueProperties, type PickQueryWindows, type PickQueryWithData, type PickQueryWithDataColumnTypes, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type PostgisPoint, type PrepareSubQueryForSql, type PrepareSubQueryForSqlArg, type Query, type QueryAfterHook, type QueryArraysResult, QueryAsMethods, type QueryBatchResult, type QueryBeforeActionHook, type QueryBeforeHook, type QueryBuilder, type QueryCatch, type QueryCatchers, QueryClone, type QueryComputedArg, QueryCreate, QueryCreateFrom, type QueryData, type QueryDataAliases, type QueryDataFromItem, type QueryDataJoinTo, type QueryDataScopes, type QueryDataSources, type QueryDataTransform, type QueryDataUnion, QueryDelete, QueryError, type QueryErrorName, QueryExpressions, QueryGet, type QueryHasSelect, type QueryHasWhere, type QueryHelperResult, QueryHookUtils, QueryHooks, type QueryIfResultThen, type QueryInternal, type QueryInternalColumnNameToKey, QueryJoin, QueryLog, type QueryLogObject, type QueryLogOptions, type QueryLogger, type QueryManyTake, type QueryManyTakeOptional, QueryMethods, QueryOrCreate, type QueryOrExpression, type QueryOrExpressionBooleanOrNullResult, type QueryResult, type QueryResultRow, type QueryReturnType, type QueryReturnTypeAll, type QueryReturnTypeOptional, type QuerySchema, QueryScope, type QueryScopeData, type QueryScopes, type QuerySelectable, type QuerySourceItem, QuerySql, type QueryTake, type QueryTakeOptional, type QueryThen, type QueryThenByQuery, type QueryThenByReturnType, type QueryThenShallowSimplify, type QueryThenShallowSimplifyArr, type QueryThenShallowSimplifyOptional, QueryTransaction, QueryTransform, type QueryType, QueryUpdate, QueryUpsert, QueryWithSchema, QueryWrap, type RawSQLValues, RawSql, type RawSqlBase, RealColumn, type RecordBoolean, type RecordKeyTrue, type RecordOfColumnsShapeBase, type RecordOptionalString, type RecordString, type RecordStringOrNumber, type RecordUnknown, RefExpression, type RelationConfigBase, type RelationConfigDataForCreate, type RelationConfigQuery, type RelationJoinQuery, type RelationsBase, type ReturnsQueryOrExpression, type RunAfterQuery, type RuntimeComputedQueryColumn, type SQLArgs, type SQLQueryArgs, type ScopeArgumentQuery, type SearchWeight, type SearchWeightRecord, Select, type SelectArg, type SelectArgs, type SelectAs, type SelectAsArg, type SelectAsFnArg, type SelectAsValue, type SelectItem, type SelectSelf, type SelectSubQueryResult, type SelectableFromShape, type SelectableOfType, type SelectableOrExpression, type SelectableOrExpressionOfType, type SelectableOrExpressions, SerialColumn, type SerialColumnData, type SetQueryResult, type SetQueryReturnsAll, type SetQueryReturnsAllResult, type SetQueryReturnsColumn, type SetQueryReturnsColumnOptional, type SetQueryReturnsColumnOrThrow, type SetQueryReturnsColumnResult, type SetQueryReturnsOne, type SetQueryReturnsOneResult, type SetQueryReturnsPluck, type SetQueryReturnsPluckColumnResult, type SetQueryReturnsRowCount, type SetQueryReturnsRowCountMany, type SetQueryReturnsRows, type SetQueryReturnsValueOptional, type SetQueryReturnsValueOrThrow, type SetQueryReturnsVoid, type SetQueryTableAlias, type SetValueQueryReturnsPluckColumn, type SetValueQueryReturnsValueOrThrow, type ShallowSimplify, type ShapeColumnPrimaryKeys, type ShapeUniqueColumns, type SimpleJoinItemNonSubQueryArgs, type SingleSql, type SingleSqlItem, SmallIntColumn, SmallSerialColumn, type SortDir, type Sql, type SqlCommonOptions, type SqlFn, SqlRefExpression, type StaticSQLArgs, type StorageOptions, StringColumn$1 as StringColumn, type StringData, type SubQueryForSql, TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, type TableHook, type TemplateLiteralArgs, TextBaseColumn, TextColumn, type TextColumnData, Then, TimeColumn, type TimeInterval, TimestampColumn, type TimestampHelpers, TimestampTZColumn, type Timestamps, type TopCTE, type TransactionAdapterBase, type TransactionAfterCommitHook, type TransactionArgs, type TransactionOptions, TsQueryColumn, TsVectorColumn, UUIDColumn, UnhandledTypeError, type UnionItem, type UnionKind, type UnionSet, type UnionToIntersection, type UniqueConstraints, type UniqueQueryTypeOrExpression, type UniqueTableDataItem, UnknownColumn, UnsafeSqlExpression, type UpdateArg, type UpdateData, type UpdateManyQueryData, type UpdateQueryDataItem, type UpdateQueryDataObject, type UpdateSelf, type UpdatedAtDataInjector, type UpsertData, type UpsertResult, type UpsertThis, VarCharColumn, VirtualColumn, Where, type WhereArg, type WhereArgs, type WhereInArg, type WhereInColumn, type WhereInItem, type WhereInValues, type WhereItem, type WhereJsonPathEqualsItem, type WhereNotArgs, type WhereOnItem, type WhereOnJoinItem, type WhereQueryBuilder, type WhereSearchItem, type WindowDeclaration, type WindowItem, type WithConfig, type WithConfigs, type WithDataItem, type WithDataItems, type WithItems, type WrapQueryArg, XMLColumn, _addToHookSelect, _addToHookSelectWithTable, _appendQuery, _applyRelationAliases, _checkIfAliased, _clone, _copyQueryAliasToQuery, _createDbSqlMethod, _getQueryAliasOrName, _getQueryAs, _getQueryFreeAlias, _getQueryOuterAliases, _hookSelectColumns, _initQueryBuilder, _join, _joinLateral, _joinLateralProcessArg, _joinReturningArgs, _orCreate, _prependWith, _queryAfterSaveCommit, _queryAll, _queryChangeCounter, _queryCreate, _queryCreateForEachFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateOneFrom, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertForEachFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertOneFrom, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryRows, _querySelect, _querySelectAll, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotExists, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, _runAfterCommitHooks, _setQueryAlias, _setQueryAs, _setSubQueryAliases, _with, addCode, addColumnParserToQuery, addParserForRawExpression, addParserForSelectItem, addQueryOn, addTopCte, addTopCteSql, addValue, addWithToSql, anyShape, applyBatchTransforms, applyComputedColumns, applyMixins, applyTransforms, arrayDataToCode, arrayMethodNames, assignDbDataToColumn, backtickQuote, callWithThis, checkIfASimpleQuery, cloneQueryBaseUnscoped, codeToString, colors, columnCheckToCode, columnCode, columnDefaultArgumentToCode, columnErrorMessagesToCode, columnExcludesToCode, columnForeignKeysToCode, columnIndexesToCode, columnMethodsToCode, columnsShapeToCode, commitSql, composeCteSingleSql, constraintInnerToCode, constraintToCode, consumeColumnName, countSelect, createCtx, createDbWithAdapter, createSelect, cteToSql, cteToSqlGiveAs, ctesToSql, dateDataToCode, dateMethodNames, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForLog, escapeForMigration, escapeString, excludeInnerToCode, excludeToCode, exhaustive, extendQuery, filterResult, finalizeNestedHookSelect, foreignKeyArgumentToCode, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnTypes, getDefaultLanguage, getDefaultNowFn, getFreeAlias, getFreeSetAlias, getFromSelectColumns, getFullColumnTable, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getSearchLang, getSearchText, getShapeFromSelect, getSqlText, getStackTrace, getThen, getTopCteSize, handleManyData, handleOneData, handleResult, havingToSql, identityToCode, indexInnerToCode, indexToCode, insert, isDefaultTimeStamp, isExpression, isInUserTransaction, isIterable, isObjectEmpty, isQuery, isQueryReturnsAll, isRawSQL, isRelationQuery, isTemplateLiteralArgs, joinSubQuery, joinTruthy, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeFnExpression, makeInsertSql, makeReturningSql, makeRowToJson, makeSql, moveMutativeQueryToCte, newDelayedRelationSelect, noop, numberDataToCode, numberMethodNames, objectHasValues, omit, orderByToSql, parseRecord, parseTableData, parseTableDataInput, pathToLog, performQuery, pick, pluralize, postgisTypmodToSql, prepareOpArg, prepareSubQueryForSql, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processJoinItem, processSelectArg, pushColumnData, pushHavingSql, pushJoinSql, pushOrNewArray, pushOrNewArrayToObjectImmutable, pushOrderBySql, pushQueryArrayImmutable, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValueImmutable, pushTableDataCode, pushUnionSql, pushWhereStatementSql, pushWhereToSql, queryColumnNameToKey, queryFrom, queryFromSql, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, quoteFromWithSchema, quoteObjectKey, quoteSchemaAndTable, quoteTableWithSchema, raw, rawSqlToCode, referencesArgsToCode, requirePrimaryKeys, requireQueryAs, requireTableOrStringFrom, resetDefaultNowFn, resolveSubQueryCallback, returnArg, rollbackSql, saveAliasedShape, searchSourcesToSql, selectAllSql, selectToSql, selectToSqlList, setColumnData, setColumnDefaultParse, setColumnEncode, setColumnParse, setColumnParseNull, setConnectRetryConfig, setCurrentColumnName, setDataValue, setDb, setDefaultLanguage, setDefaultNowFn, setDelayedRelation, setFreeAlias, setFreeTopCteAs, setMoveMutativeQueryToCte, setObjectValueImmutable, setParserForSelectedString, setPrepareSubQueryForSql, setQueryObjectValueImmutable, setQueryOperators, setRawSqlPrepareSubQueryForSql, setSqlCtxSelectList, setTopCteSize, singleQuote, singleQuoteArray, snakeCaseKey, spreadObjectValues, sqlFn, sqlQueryArgsToExpression, stringDataToCode, stringMethodNames, tableDataMethods, templateLiteralSQLToCode, templateLiteralToSQL, testTransaction, throwIfJoinLateral, throwIfNoWhere, throwOnReadOnly, throwOnReadOnlyUpdate, timestampHelpers, toArray, toCamelCase, toPascalCase, toSnakeCase, whereToSql, windowToSql, wrapAdapterFnWithConnectRetry };
|
|
11354
|
+
export { type AdapterBase, type AdapterConfigBase, type AdapterConfigConnectRetry, type AdapterTransactionOptions, type AddQueryDefaults, type AdditionalDateData, type AdditionalNumberData, type AdditionalStringData, AfterCommitError, type AfterCommitErrorFulfilledResult, type AfterCommitErrorHandler, type AfterCommitErrorRejectedResult, type AfterCommitErrorResult, type AfterCommitHook, type AfterCommitStandaloneHook, type AfterHook, type AggregateOptions, type ArgWithBeforeAndBeforeSet, ArrayColumn, type ArrayColumnValue, type ArrayData, type ArrayMethodsData, type ArrayMethodsDataForBaseColumn, type AsFn, type AsQueryArg, type AsyncState, type AsyncTransactionState, type BaseNumberData, type BatchSql, BigIntColumn, BigSerialColumn, BitColumn, BitVaryingColumn, BooleanColumn, BoxColumn, ByteaColumn, type ChangeCountArg, CidrColumn, CircleColumn, CitextColumn, type Code, type Codes, Column, type ColumnFromDbParams, ColumnRefExpression, type ColumnSchemaConfig, type ColumnSchemaGetterColumns, type ColumnSchemaGetterTableClass, type ColumnToCodeCtx, type ColumnTypeSchemaArg, type ColumnsByType, ColumnsShape, ComputedColumn, type ComputedColumns, type ComputedColumnsFromOptions, type ComputedMethods, type ComputedOptionsConfig, type ComputedOptionsFactory, type CreateBelongsToData, type CreateColumn, type CreateCtx, type CreateData, type CreateFromMethodNames, type CreateManyFromMethodNames, type CreateManyMethodsNames, type CreateMethodsNames, type CreateRelationsData, type CreateRelationsDataOmittingFKeys, type CreateResult, type CreateSelf, type CteArgsOptions, type CteHooks, type CteItem, type CteOptions, CteQuery, type CteQueryBuilder, type CteRecursiveOptions, type CteResult, type CteSqlResult, type CteTableHook, type CteTableHooks, CustomTypeColumn, DateBaseColumn, DateColumn, type DateColumnData, type DateColumnInput, DateTimeBaseClass, DateTimeTzBaseClass, Db, type DbDomainArg, type DbDomainArgRecord, type DbExtension, type DbOptions, type DbOptionsWithAdapter, type DbResult, type DbRole, type DbSharedOptions, type DbSqlMethod, type DbSqlQuery, type DbStructureDomainsMap, type DbTableConstructor, type DbTableOptionScopes, type DbTableOptions, DecimalColumn, type DecimalColumnData, type DefaultColumnTypes, DefaultPrivileges, type DefaultSchemaConfig, type DelayedRelationSelect, type DeleteArgs, type DeleteMethodsNames, type DeleteResult, DomainColumn, DoublePrecisionColumn, DynamicRawSQL, type DynamicSQLArg, type EmptyObject, type EmptyTuple, EnumColumn, Expression, type ExpressionChain, type ExpressionData, type ExpressionOutput, ExpressionTypeMethod, FnExpression, type FnExpressionArgs, type FnExpressionArgsPairs, type FnExpressionArgsValue, type FnUnknownToUnknown, type FromArg, FromMethods, type FromQuerySelf, type FromResult, type GeneratorIgnore, type GroupArgs, type HandleResult, type HasBeforeAndBeforeSet, type HasCteHooks, type HasHookSelect, type HasTableHook, type HavingItem, type HookAction, type HookSelect, type HookSelectArg, type HookSelectValue, type IdentityColumn, InetColumn, IntegerBaseColumn, IntegerColumn, IntervalColumn, type IsQueries, type IsQuery, type IsSubQuery, type IsolationLevel, JSONColumn, JSONTextColumn, type JoinArgToQuery, type JoinArgs, type JoinCallback, type JoinCallbackArgs, type JoinFirstArg, type JoinItem, type JoinItemArgs, type JoinLateralResult, type JoinQueryBuilder, type JoinQueryMethod, type JoinResult, type JoinResultFromArgs, type JoinResultRequireMain, type JoinResultSelectable, type JoinValueDedupItem, type JoinedParsers, type JoinedShapes, LimitedTextBaseColumn, LineColumn, LsegColumn, MacAddr8Column, MacAddrColumn, type MapTableScopesOption, type MaybeArray, type MaybePromise, type MergeQuery, type MergeQueryArg, MergeQueryMethods, MoneyColumn, MoreThanOneRowError, type MoveMutativeQueryToCte, type NoPrimaryKeyOption, type NonUniqDataItem, NotFoundError, NumberAsStringBaseColumn, NumberBaseColumn, type NumberColumnData, type NumericColumns, type OnConflictMerge, OnConflictQueryBuilder, type OnConflictSet, type OnConflictTarget, OnMethods, type Operator, type OperatorToSQL, Operators, type OperatorsAny, type OperatorsArray, type OperatorsBoolean, type OperatorsDate, type OperatorsJson, type OperatorsNumber, type OperatorsOrdinalText, type OperatorsText, type OperatorsTime, type OrCreateArg, OrExpression, type OrExpressionArg, OrchidOrmError, OrchidOrmInternalError, type OrderArg, type OrderItem, type OrderTsQueryConfig, type Over, PathColumn, type PickQueryAs, type PickQueryBaseQuery, type PickQueryColumTypes, type PickQueryDataShapeAndJoinedShapes, type PickQueryDataShapeAndJoinedShapesAndAliases, type PickQueryDefaultSelect, type PickQueryDefaults, type PickQueryHasSelect, type PickQueryHasSelectHasWhereResultReturnType, type PickQueryHasSelectResult, type PickQueryHasSelectResultReturnType, type PickQueryHasSelectResultShapeAsRelations, type PickQueryHasWhere, type PickQueryInputType, type PickQueryInternal, type PickQueryIsSubQuery, type PickQueryMetaSelectableResultRelationsWindowsColumnTypes, type PickQueryMetaSelectableResultRelationsWithDataReturnTypeShapeAs, type PickQueryQ, type PickQueryQAndBaseQuery, type PickQueryQAndInternal, type PickQueryRelationQueries, type PickQueryRelations, type PickQueryRelationsWithData, type PickQueryResult, type PickQueryResultAs, type PickQueryResultAsRelations, type PickQueryResultColumnTypes, type PickQueryResultRelationsWithDataReturnTypeShape, type PickQueryResultReturnType, type PickQueryResultReturnTypeUniqueColumns, type PickQueryResultUniqueColumns, type PickQueryReturnType, type PickQueryScopes, type PickQuerySelectable, type PickQuerySelectableColumnTypes, type PickQuerySelectableRelations, type PickQuerySelectableRelationsResultReturnType, type PickQuerySelectableResult, type PickQuerySelectableResultAs, type PickQuerySelectableResultInputTypeAs, type PickQuerySelectableResultRelationsWindows, type PickQuerySelectableResultRelationsWithDataReturnType, type PickQuerySelectableResultRelationsWithDataReturnTypeShapeAs, type PickQuerySelectableResultWindows, type PickQuerySelectableReturnType, type PickQuerySelectableShape, type PickQuerySelectableShapeAs, type PickQuerySelectableShapeRelationsReturnTypeIsSubQuery, type PickQuerySelectableShapeRelationsWithData, type PickQuerySelectableShapeRelationsWithDataAs, type PickQuerySelectableShapeRelationsWithDataAsResultReturnType, type PickQueryShape, type PickQueryShapeAsRelations, type PickQueryShapeResultReturnTypeSinglePrimaryKey, type PickQueryShapeResultSinglePrimaryKey, type PickQueryShapeSinglePrimaryKey, type PickQuerySinglePrimaryKey, type PickQueryTable, type PickQueryTableMetaShapeTableAs, type PickQueryThen, type PickQueryTsQuery, type PickQueryUniqueProperties, type PickQueryWindows, type PickQueryWithData, type PickQueryWithDataColumnTypes, PointColumn, PolygonColumn, PostgisGeographyPointColumn, type PostgisPoint, type PrepareSubQueryForSql, type PrepareSubQueryForSqlArg, type Query, type QueryAfterHook, type QueryArraysResult, QueryAsMethods, type QueryBatchResult, type QueryBeforeActionHook, type QueryBeforeHook, type QueryBuilder, type QueryCatch, type QueryCatchers, QueryClone, type QueryComputedArg, QueryCreate, QueryCreateFrom, type QueryData, type QueryDataAliases, type QueryDataFromItem, type QueryDataJoinTo, type QueryDataScopes, type QueryDataSources, type QueryDataTransform, type QueryDataUnion, QueryDelete, QueryError, type QueryErrorName, QueryExpressions, QueryGet, type QueryHasSelect, type QueryHasWhere, type QueryHelperResult, QueryHookUtils, QueryHooks, type QueryIfResultThen, type QueryInternal, type QueryInternalColumnNameToKey, QueryJoin, QueryLog, type QueryLogObject, type QueryLogOptions, type QueryLogger, type QueryManyTake, type QueryManyTakeOptional, QueryMethods, QueryOrCreate, type QueryOrExpression, type QueryOrExpressionBooleanOrNullResult, type QueryResult, type QueryResultRow, type QueryReturnType, type QueryReturnTypeAll, type QueryReturnTypeOptional, type QuerySchema, QueryScope, type QueryScopeData, type QueryScopes, type QuerySelectable, type QuerySourceItem, QuerySql, type QueryTake, type QueryTakeOptional, type QueryThen, type QueryThenByQuery, type QueryThenByReturnType, type QueryThenShallowSimplify, type QueryThenShallowSimplifyArr, type QueryThenShallowSimplifyOptional, QueryTransaction, QueryTransform, type QueryType, QueryUpdate, QueryUpsert, QueryWithSchema, QueryWrap, type RawSQLValues, RawSql, type RawSqlBase, RealColumn, type RecordBoolean, type RecordKeyTrue, type RecordOfColumnsShapeBase, type RecordOptionalString, type RecordString, type RecordStringOrNumber, type RecordUnknown, RefExpression, type RelationConfigBase, type RelationConfigDataForCreate, type RelationConfigQuery, type RelationJoinQuery, type RelationsBase, type ReturnsQueryOrExpression, type RunAfterQuery, type RuntimeComputedQueryColumn, type SQLArgs, type SQLQueryArgs, type ScopeArgumentQuery, type SearchWeight, type SearchWeightRecord, Select, type SelectArg, type SelectArgs, type SelectAs, type SelectAsArg, type SelectAsFnArg, type SelectAsValue, type SelectItem, type SelectSelf, type SelectSubQueryResult, type SelectableFromShape, type SelectableOfType, type SelectableOrExpression, type SelectableOrExpressionOfType, type SelectableOrExpressions, SerialColumn, type SerialColumnData, type SetQueryResult, type SetQueryReturnsAll, type SetQueryReturnsAllResult, type SetQueryReturnsColumn, type SetQueryReturnsColumnOptional, type SetQueryReturnsColumnOrThrow, type SetQueryReturnsColumnResult, type SetQueryReturnsOne, type SetQueryReturnsOneResult, type SetQueryReturnsPluck, type SetQueryReturnsPluckColumnResult, type SetQueryReturnsRowCount, type SetQueryReturnsRowCountMany, type SetQueryReturnsRows, type SetQueryReturnsValueOptional, type SetQueryReturnsValueOrThrow, type SetQueryReturnsVoid, type SetQueryTableAlias, type SetValueQueryReturnsPluckColumn, type SetValueQueryReturnsValueOrThrow, type ShallowSimplify, type ShapeColumnPrimaryKeys, type ShapeUniqueColumns, type SimpleJoinItemNonSubQueryArgs, type SingleSql, type SingleSqlItem, SmallIntColumn, SmallSerialColumn, type SortDir, type Sql, type SqlCommonOptions, type SqlFn, SqlRefExpression, type StaticSQLArgs, type StorageOptions, StringColumn$1 as StringColumn, type StringData, type SubQueryForSql, TableData, type TableDataFn, type TableDataInput, type TableDataItem, type TableDataItemsUniqueColumnTuples, type TableDataItemsUniqueColumns, type TableDataItemsUniqueConstraints, type TableDataMethods, type TableHook, type TemplateLiteralArgs, TextBaseColumn, TextColumn, type TextColumnData, Then, TimeColumn, type TimeInterval, TimestampColumn, type TimestampHelpers, TimestampTZColumn, type Timestamps, type TopCTE, type TransactionAdapterBase, type TransactionAfterCommitHook, type TransactionArgs, type TransactionOptions, TsQueryColumn, TsVectorColumn, UUIDColumn, UnhandledTypeError, type UnionItem, type UnionKind, type UnionSet, type UnionToIntersection, type UniqueConstraints, type UniqueQueryTypeOrExpression, type UniqueTableDataItem, UnknownColumn, UnsafeSqlExpression, type UpdateArg, type UpdateData, type UpdateManyQueryData, type UpdateQueryDataItem, type UpdateQueryDataObject, type UpdateSelf, type UpdatedAtDataInjector, type UpsertData, type UpsertResult, type UpsertThis, VarCharColumn, VirtualColumn, Where, type WhereArg, type WhereArgs, type WhereInArg, type WhereInColumn, type WhereInItem, type WhereInValues, type WhereItem, type WhereJsonPathEqualsItem, type WhereNotArgs, type WhereOnItem, type WhereOnJoinItem, type WhereQueryBuilder, type WhereSearchItem, type WindowDeclaration, type WindowItem, type WithConfig, type WithConfigs, type WithDataItem, type WithDataItems, type WithItems, type WrapQueryArg, XMLColumn, _addToHookSelect, _addToHookSelectWithTable, _appendQuery, _applyRelationAliases, _checkIfAliased, _clone, _copyQueryAliasToQuery, _createDbSqlMethod, _getQueryAliasOrName, _getQueryAs, _getQueryFreeAlias, _getQueryOuterAliases, _hookSelectColumns, _initQueryBuilder, _join, _joinLateral, _joinLateralProcessArg, _joinReturningArgs, _orCreate, _prependWith, _queryAfterSaveCommit, _queryAll, _queryChangeCounter, _queryCreate, _queryCreateForEachFrom, _queryCreateMany, _queryCreateManyFrom, _queryCreateOneFrom, _queryDefaults, _queryDelete, _queryExec, _queryFindBy, _queryFindByOptional, _queryHookAfterCreate, _queryHookAfterCreateCommit, _queryHookAfterDelete, _queryHookAfterDeleteCommit, _queryHookAfterQuery, _queryHookAfterSave, _queryHookAfterUpdate, _queryHookAfterUpdateCommit, _queryHookBeforeCreate, _queryHookBeforeDelete, _queryHookBeforeQuery, _queryHookBeforeSave, _queryHookBeforeUpdate, _queryInsert, _queryInsertForEachFrom, _queryInsertMany, _queryInsertManyFrom, _queryInsertOneFrom, _queryJoinOn, _queryJoinOnJsonPathEquals, _queryJoinOrOn, _queryOr, _queryOrNot, _queryRows, _querySelect, _querySelectAll, _queryTake, _queryTakeOptional, _queryUpdate, _queryUpdateOrThrow, _queryUpsert, _queryWhere, _queryWhereExists, _queryWhereIn, _queryWhereNot, _queryWhereNotExists, _queryWhereNotOneOf, _queryWhereNotSql, _queryWhereOneOf, _queryWhereSql, _runAfterCommitHooks, _setQueryAlias, _setQueryAs, _setSubQueryAliases, _with, addCode, addColumnParserToQuery, addParserForRawExpression, addParserForSelectItem, addQueryOn, addTopCte, addTopCteSql, addValue, addWithToSql, anyShape, applyBatchTransforms, applyComputedColumns, applyMixins, applyTransforms, arrayDataToCode, arrayMethodNames, assignDbDataToColumn, backtickQuote, callWithThis, checkIfASimpleQuery, cloneQueryBaseUnscoped, codeToString, colors, columnCheckToCode, columnCode, columnDefaultArgumentToCode, columnErrorMessagesToCode, columnExcludesToCode, columnForeignKeysToCode, columnIndexesToCode, columnMethodsToCode, columnsShapeToCode, commitSql, composeCteSingleSql, constraintInnerToCode, constraintToCode, consumeColumnName, countSelect, createCtx, createDbWithAdapter, createSelect, cteToSql, cteToSqlGiveAs, ctesToSql, dateDataToCode, dateMethodNames, deepCompare, defaultSchemaConfig, emptyArray, emptyObject, escapeForLog, escapeForMigration, escapeString, excludeInnerToCode, excludeToCode, exhaustive, extendQuery, filterResult, finalizeNestedHookSelect, foreignKeyArgumentToCode, getCallerFilePath, getClonedQueryData, getColumnBaseType, getColumnTypes, getDefaultLanguage, getDefaultNowFn, getFreeAlias, getFreeSetAlias, getFromSelectColumns, getFullColumnTable, getImportPath, getPrimaryKeys, getQueryAs, getQuerySchema, getSearchLang, getSearchText, getShapeFromSelect, getSqlText, getStackTrace, getSupportedDefaultPrivileges, getThen, getTopCteSize, handleManyData, handleOneData, handleResult, havingToSql, identityToCode, indexInnerToCode, indexToCode, insert, isDefaultTimeStamp, isExpression, isInUserTransaction, isIterable, isObjectEmpty, isQuery, isQueryReturnsAll, isRawSQL, isRelationQuery, isTemplateLiteralArgs, joinSubQuery, joinTruthy, logColors, logParamToLogObject, makeColumnNullable, makeColumnTypes, makeColumnsByType, makeFnExpression, makeInsertSql, makeReturningSql, makeRowToJson, makeSql, moveMutativeQueryToCte, newDelayedRelationSelect, noop, numberDataToCode, numberMethodNames, objectHasValues, omit, orderByToSql, parseRecord, parseTableData, parseTableDataInput, pathToLog, performQuery, pick, pluralize, postgisTypmodToSql, prepareOpArg, prepareSubQueryForSql, primaryKeyInnerToCode, processComputedBatches, processComputedResult, processJoinItem, processSelectArg, pushColumnData, pushHavingSql, pushJoinSql, pushOrNewArray, pushOrNewArrayToObjectImmutable, pushOrderBySql, pushQueryArrayImmutable, pushQueryOn, pushQueryOnForOuter, pushQueryOrOn, pushQueryValueImmutable, pushTableDataCode, pushUnionSql, pushWhereStatementSql, pushWhereToSql, queryColumnNameToKey, queryFrom, queryFromSql, queryMethodByReturnType, queryTypeWithLimitOne, queryWrap, quoteFromWithSchema, quoteObjectKey, quoteSchemaAndTable, quoteTableWithSchema, raw, rawSqlToCode, referencesArgsToCode, requirePrimaryKeys, requireQueryAs, requireTableOrStringFrom, resetDefaultNowFn, resolveSubQueryCallback, returnArg, rollbackSql, saveAliasedShape, searchSourcesToSql, selectAllSql, selectToSql, selectToSqlList, setColumnData, setColumnDefaultParse, setColumnEncode, setColumnParse, setColumnParseNull, setConnectRetryConfig, setCurrentColumnName, setDataValue, setDb, setDefaultLanguage, setDefaultNowFn, setDelayedRelation, setFreeAlias, setFreeTopCteAs, setMoveMutativeQueryToCte, setObjectValueImmutable, setParserForSelectedString, setPrepareSubQueryForSql, setQueryObjectValueImmutable, setQueryOperators, setRawSqlPrepareSubQueryForSql, setSqlCtxSelectList, setTopCteSize, singleQuote, singleQuoteArray, snakeCaseKey, spreadObjectValues, sqlFn, sqlQueryArgsToExpression, stringDataToCode, stringMethodNames, tableDataMethods, templateLiteralSQLToCode, templateLiteralToSQL, testTransaction, throwIfJoinLateral, throwIfNoWhere, throwOnReadOnly, throwOnReadOnlyUpdate, timestampHelpers, toArray, toCamelCase, toPascalCase, toSnakeCase, whereToSql, windowToSql, wrapAdapterFnWithConnectRetry };
|
package/dist/index.js
CHANGED
|
@@ -14243,6 +14243,75 @@ class QueryScope {
|
|
|
14243
14243
|
}
|
|
14244
14244
|
}
|
|
14245
14245
|
|
|
14246
|
+
const DEFAULT_PRIVILEGE = {
|
|
14247
|
+
OBJECT_TYPES: [
|
|
14248
|
+
"TABLES",
|
|
14249
|
+
"SEQUENCES",
|
|
14250
|
+
"FUNCTIONS",
|
|
14251
|
+
"TYPES",
|
|
14252
|
+
"SCHEMAS",
|
|
14253
|
+
"LARGE_OBJECTS"
|
|
14254
|
+
],
|
|
14255
|
+
PRIVILEGES: {
|
|
14256
|
+
TABLE: [
|
|
14257
|
+
"ALL",
|
|
14258
|
+
"SELECT",
|
|
14259
|
+
"INSERT",
|
|
14260
|
+
"UPDATE",
|
|
14261
|
+
"DELETE",
|
|
14262
|
+
"TRUNCATE",
|
|
14263
|
+
"REFERENCES",
|
|
14264
|
+
"TRIGGER",
|
|
14265
|
+
"MAINTAIN"
|
|
14266
|
+
// Supported starting with PostgreSQL 17
|
|
14267
|
+
],
|
|
14268
|
+
SEQUENCE: ["ALL", "USAGE", "SELECT", "UPDATE"],
|
|
14269
|
+
FUNCTION: ["ALL", "EXECUTE"],
|
|
14270
|
+
TYPE: ["ALL", "USAGE"],
|
|
14271
|
+
SCHEMA: ["ALL", "USAGE", "CREATE"],
|
|
14272
|
+
LARGE_OBJECT: ["ALL", "SELECT", "UPDATE"]
|
|
14273
|
+
}
|
|
14274
|
+
};
|
|
14275
|
+
const supportedPrivilegesCache = /* @__PURE__ */ new Map();
|
|
14276
|
+
function getSupportedDefaultPrivileges(version) {
|
|
14277
|
+
const cached = supportedPrivilegesCache.get(version);
|
|
14278
|
+
if (cached) return cached;
|
|
14279
|
+
let result;
|
|
14280
|
+
if (version >= 18) {
|
|
14281
|
+
result = DEFAULT_PRIVILEGE;
|
|
14282
|
+
} else if (version >= 17) {
|
|
14283
|
+
result = {
|
|
14284
|
+
OBJECT_TYPES: DEFAULT_PRIVILEGE.OBJECT_TYPES.filter(
|
|
14285
|
+
(t) => t !== "LARGE_OBJECTS"
|
|
14286
|
+
),
|
|
14287
|
+
PRIVILEGES: {
|
|
14288
|
+
TABLE: [...DEFAULT_PRIVILEGE.PRIVILEGES.TABLE],
|
|
14289
|
+
SEQUENCE: [...DEFAULT_PRIVILEGE.PRIVILEGES.SEQUENCE],
|
|
14290
|
+
FUNCTION: [...DEFAULT_PRIVILEGE.PRIVILEGES.FUNCTION],
|
|
14291
|
+
TYPE: [...DEFAULT_PRIVILEGE.PRIVILEGES.TYPE],
|
|
14292
|
+
SCHEMA: [...DEFAULT_PRIVILEGE.PRIVILEGES.SCHEMA]
|
|
14293
|
+
}
|
|
14294
|
+
};
|
|
14295
|
+
} else {
|
|
14296
|
+
result = {
|
|
14297
|
+
OBJECT_TYPES: DEFAULT_PRIVILEGE.OBJECT_TYPES.filter(
|
|
14298
|
+
(t) => t !== "LARGE_OBJECTS"
|
|
14299
|
+
),
|
|
14300
|
+
PRIVILEGES: {
|
|
14301
|
+
TABLE: DEFAULT_PRIVILEGE.PRIVILEGES.TABLE.filter(
|
|
14302
|
+
(p) => p !== "MAINTAIN"
|
|
14303
|
+
),
|
|
14304
|
+
SEQUENCE: [...DEFAULT_PRIVILEGE.PRIVILEGES.SEQUENCE],
|
|
14305
|
+
FUNCTION: [...DEFAULT_PRIVILEGE.PRIVILEGES.FUNCTION],
|
|
14306
|
+
TYPE: [...DEFAULT_PRIVILEGE.PRIVILEGES.TYPE],
|
|
14307
|
+
SCHEMA: [...DEFAULT_PRIVILEGE.PRIVILEGES.SCHEMA]
|
|
14308
|
+
}
|
|
14309
|
+
};
|
|
14310
|
+
}
|
|
14311
|
+
supportedPrivilegesCache.set(version, result);
|
|
14312
|
+
return result;
|
|
14313
|
+
}
|
|
14314
|
+
|
|
14246
14315
|
class QueryJsonMethods {
|
|
14247
14316
|
/**
|
|
14248
14317
|
* Wraps the query in a way to select a single JSON string.
|
|
@@ -16363,6 +16432,7 @@ exports.getSearchText = getSearchText;
|
|
|
16363
16432
|
exports.getShapeFromSelect = getShapeFromSelect;
|
|
16364
16433
|
exports.getSqlText = getSqlText;
|
|
16365
16434
|
exports.getStackTrace = getStackTrace;
|
|
16435
|
+
exports.getSupportedDefaultPrivileges = getSupportedDefaultPrivileges;
|
|
16366
16436
|
exports.getThen = getThen;
|
|
16367
16437
|
exports.getTopCteSize = getTopCteSize;
|
|
16368
16438
|
exports.handleManyData = handleManyData;
|