package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
InitDefaultPrivilegesForRole creates the default DefaultPrivilegesForRole for a user.
NewBaseDatabasePrivilegeDescriptor creates defaults privileges for a database.
NewBaseFunctionPrivilegeDescriptor returns a privilege descriptor with default privileges for a function descriptor.
NewBasePrivilegeDescriptor returns a privilege descriptor with ALL privileges for the root user and admin role.
NewCustomSuperuserPrivilegeDescriptor returns a privilege descriptor for the root user and the admin role with specified privileges.
NewPrivilegeDescriptor returns a privilege descriptor for the given user with the specified list of privileges.
NewPublicSchemaPrivilegeDescriptor is used to construct a privilege descriptor owned by the given user which has USAGE privilege, and optionally CREATE privilege, for the public role, and ALL privileges for superusers.
NewTemporarySchemaPrivilegeDescriptor is used to construct a privilege descriptor owned by the admin user which has CREATE and USAGE privilege for the public role.
NewVirtualSchemaPrivilegeDescriptor is used to construct a privilege descriptor owned by the node user which has USAGE privilege for the public role.
# Constants
AutoPartialStatsEnabledSettingName is the name of the automatic partial stats collection enabled cluster setting.
AutoPartialStatsEnabledTableSettingName is the name of the automatic partial stats collection enabled table setting.
AutoPartialStatsFractionStaleSettingName is the name of the automatic partial stats collection fraction stale rows cluster setting.
AutoPartialStatsFractionStaleTableSettingName is the name of the automatic partial stats collection fraction stale rows table setting.
AutoPartialStatsMinStaleSettingName is the name of the automatic partial stats collection min stale rows cluster setting.
AutoPartialStatsMinStaleTableSettingName is the name of the automatic partial stats collection min stale rows table setting.
The values for AutoStatsCollectionStatus.
The values for AutoStatsCollectionStatus.
The values for AutoStatsCollectionStatus.
AutoStatsEnabledSettingName is the name of the automatic stats collection enabled cluster setting.
AutoStatsEnabledTableSettingName is the name of the automatic stats collection enabled table setting.
AutoStatsFractionStaleSettingName is the name of the automatic stats collection fraction stale rows cluster setting.
AutoStatsFractionStaleTableSettingName is the name of the automatic stats collection fraction stale rows table setting.
AutoStatsMinStaleSettingName is the name of the automatic stats collection min stale rows cluster setting.
AutoStatsMinStaleTableSettingName is the name of the automatic stats collection min stale rows table setting.
AutoStatsOnSystemTables is the name of the autostats on system tables cluster setting.
DefaultFunctionLeakProof is the LeakProof flag assigned to a user defined function if there is no user provided value through CREATE (OR REPLACE) FUNCTION.
DefaultFunctionVolatility is the default volatility assigned to a user defined function if there is no user provided volatility through CREATE (OR REPLACE) FUNCTION.
InitialVersion corresponds to all descriptors created before 20.1.
InvalidJobID is the zero value for JobID corresponding to no job.
InvalidScheduleID is a constant indicating the schedule ID is not valid.
OwnerVersion corresponds to descriptors created 20.2 and onward.
TTLDefaultExpirationColumnName is the column name representing the expiration column for TTL.
UseStatsOnSystemTables is the name of the use statistics on system tables cluster setting.
Version21_2 corresponds to descriptors created in 21.2 and onwards.
Version23_2 corresponds to descriptors created in 23.2 and onwards.
# Variables
DefaultSuperuserPrivileges is the list of privileges for super users on non-system objects.
DefaultTTLExpirationExpr is default TTL expression when ttl_expiration_expression is not specified.
# Structs
DefaultPrivilegesRole represents the creator role that the default privileges are being altered for.
UserPrivilege represents a User and its Privileges.
# Type aliases
AutoPartialStatsCollectionStatus represents whether the auto stats collections enabled table setting is enabled, disabled or not set.
AutoStatsCollectionStatus represents whether the auto stats collections enabled table setting is enabled, disabled, or not set.
Expression is a SQL expression encoded as a string.
JobID is the ID of a job.
PrivilegeDescVersion is a custom type for PrivilegeDescriptor versions.
RegionName is an alias for a region stored on the database.
RegionNames is an alias for a slice of regions.
ScheduleID is the ID of a job schedule.