Skip to main content

Crate postgres_static_analyzer_reflect

Crate postgres_static_analyzer_reflect 

Source
Expand description

Functions to actually read the catalog tables from a running postgres instance, and translate them into ddl-catalog-structs.

Uses tokio-postgres through clorinde.

Most likely you’ll want to use reflect_db_state.

Modules§

ordered_float
Wrappers for total order on Floats. See the OrderedFloat and NotNan docs for details.

Structs§

AclItem
Access control items, similar to what you’d get if you called aclexplode, except that grants are grouped by grantee/grantor pairs.
DbState
A large wrapper struct that holds the results of all the other reflections. Only includes information for the single database, which is why pg_database isn’t a collection. Objects that are “cluster shared” such as roles are those for the entire cluster.
Grant
PgAggregate
The DDL-only contents of pg_aggregate
PgAm
The DDL-only contents of pg_am
PgAmop
The DDL-only contents of pg_amop
PgAmproc
The DDL-only contents of pg_amproc
PgAttrdef
The DDL-only contents of pg_attrdef
PgAttribute
The DDL-only contents of pg_attribute
PgAuthMembers
The DDL-only contents of pg_auth_members
PgCast
The DDL-only contents of pg_cast
PgClass
The DDL-only contents of pg_class
PgClient
An asynchronous PostgreSQL client.
PgCollation
The DDL-only contents of pg_collation
PgConstraint
The DDL-only contents of pg_constraint
PgConversion
The DDL-only contents of pg_conversion
PgDatabase
The DDL-only contents of pg_database
PgDbRoleSetting
The DDL-only contents of pg_db_role_setting
PgDefaultAcl
The DDL-only contents of pg_default_acl
PgEnum
The DDL-only contents of pg_enum
PgEventTrigger
The DDL-only contents of pg_event_trigger
PgExtension
The DDL-only contents of pg_extension
PgForeignDataWrapper
The DDL-only contents of pg_foreign_data_wrapper
PgForeignServer
The DDL-only contents of pg_foreign_server
PgForeignTable
The DDL-only contents of pg_foreign_table
PgIndex
The DDL-only contents of pg_index
PgInherits
The DDL-only contents of pg_inherits
PgLanguage
The DDL-only contents of pg_language
PgMatviews
The DDL-only contents of pg_matviews
PgNamespace
The DDL-only contents of pg_namespace
PgOpclass
The DDL-only contents of pg_opclass
PgOperator
The DDL-only contents of pg_operator
PgOpfamily
The DDL-only contents of pg_opfamily
PgParameterAcl
The DDL-only contents of pg_parameter_acl
PgPartitionedTable
The DDL-only contents of pg_partitioned_table
PgPolicy
The DDL-only contents of pg_policy
PgProc
The DDL-only contents of pg_proc
PgPublication
The DDL-only contents of pg_publication
PgPublicationNamespace
The DDL-only contents of pg_publication_namespace
PgPublicationRel
The DDL-only contents of pg_publication_rel
PgRange
The DDL-only contents of pg_range
PgRoles
The DDL-only contents of pg_roles
PgRules
The DDL-only contents of pg_rules
PgSequence
The DDL-only contents of pg_sequence
PgStatisticExt
The DDL-only contents of pg_statistic_ext
PgSubscription
The DDL-only contents of pg_subscription
PgTransform
The DDL-only contents of pg_transform
PgTrigger
The DDL-only contents of pg_trigger
PgTsConfig
The DDL-only contents of pg_ts_config
PgTsConfigMap
The DDL-only contents of pg_ts_config_map
PgTsDict
The DDL-only contents of pg_ts_dict
PgTsParser
The DDL-only contents of pg_ts_parser
PgTsTemplate
The DDL-only contents of pg_ts_template
PgType
The DDL-only contents of pg_type
PgUserMappings
The DDL-only contents of pg_user_mappings
PgViews
The DDL-only contents of pg_views
Str
A SmolStr is a string type that has the following properties:

Enums§

AclDefaultAclPrivilege
DbAclPrivilege
ForeignDataWrapperAclPrivilege
ForeignServerAclPrivilege
FunctionAclPrivilege
LanguageAclPrivilege
ParameterAclPrivilege
PgAggregateAggfinalmodify
PgAggregateAggkind
PgAggregateAggmfinalmodify
PgAmAmtype
PgAmopAmoppurpose
PgAttributeAttcompression
PgAttributeAttgenerated
PgAttributeAttidentity
PgAttributeInitprivsType
PgCastCastcontext
PgCastCastmethod
PgClassInitprivsType
PgClassRelkind
PgClassRelpersistence
PgClassRelreplident
PgCollationCollprovider
PgConstraintConfdeltype
PgConstraintConfmatchtype
PgConstraintConfupdtype
PgConstraintContype
PgDatabaseDatlocprovider
PgDefaultAclDefaclobjtype
PgEventTriggerEvtenabled
PgForeignDataWrapperInitprivsType
PgForeignServerInitprivsType
PgLanguageInitprivsType
PgNamespaceInitprivsType
PgOperatorOprkind
PgParameterAclInitprivsType
PgPartitionedTablePartstrat
PgPolicyPolcmd
PgProcProargmodes
PgProcProkind
PgProcProparallel
PgProcProvolatile
PgStatisticExtStxkind
PgSubscriptionSubstream
PgSubscriptionSubtwophasestate
PgTriggerTgenabled
PgTypeInitprivsType
PgTypeTypalign
PgTypeTypstorage
PgTypeTyptype
SchemaAclPrivilege
TableAclPrivilege
TableColumnAclPrivilege
TypeAclPrivilege

Functions§

reflect_db_state
A large wrapper function that calls all the other reflection functions.
reflect_pg_aggregate
Asynchronously pull the contents of pg_aggregate
reflect_pg_am
Asynchronously pull the contents of pg_am
reflect_pg_amop
Asynchronously pull the contents of pg_amop
reflect_pg_amproc
Asynchronously pull the contents of pg_amproc
reflect_pg_attrdef
Asynchronously pull the contents of pg_attrdef
reflect_pg_attribute
Asynchronously pull the contents of pg_attribute
reflect_pg_auth_members
Asynchronously pull the contents of pg_auth_members
reflect_pg_cast
Asynchronously pull the contents of pg_cast
reflect_pg_class
Asynchronously pull the contents of pg_class
reflect_pg_collation
Asynchronously pull the contents of pg_collation
reflect_pg_constraint
Asynchronously pull the contents of pg_constraint
reflect_pg_conversion
Asynchronously pull the contents of pg_conversion
reflect_pg_database
Asynchronously pull the contents of pg_database
reflect_pg_db_role_setting
Asynchronously pull the contents of pg_db_role_setting
reflect_pg_default_acl
Asynchronously pull the contents of pg_default_acl
reflect_pg_enum
Asynchronously pull the contents of pg_enum
reflect_pg_event_trigger
Asynchronously pull the contents of pg_event_trigger
reflect_pg_extension
Asynchronously pull the contents of pg_extension
reflect_pg_foreign_data_wrapper
Asynchronously pull the contents of pg_foreign_data_wrapper
reflect_pg_foreign_server
Asynchronously pull the contents of pg_foreign_server
reflect_pg_foreign_table
Asynchronously pull the contents of pg_foreign_table
reflect_pg_index
Asynchronously pull the contents of pg_index
reflect_pg_inherits
Asynchronously pull the contents of pg_inherits
reflect_pg_language
Asynchronously pull the contents of pg_language
reflect_pg_matviews
Asynchronously pull the contents of pg_matviews
reflect_pg_namespace
Asynchronously pull the contents of pg_namespace
reflect_pg_opclass
Asynchronously pull the contents of pg_opclass
reflect_pg_operator
Asynchronously pull the contents of pg_operator
reflect_pg_opfamily
Asynchronously pull the contents of pg_opfamily
reflect_pg_parameter_acl
Asynchronously pull the contents of pg_parameter_acl
reflect_pg_partitioned_table
Asynchronously pull the contents of pg_partitioned_table
reflect_pg_policy
Asynchronously pull the contents of pg_policy
reflect_pg_proc
Asynchronously pull the contents of pg_proc
reflect_pg_publication
Asynchronously pull the contents of pg_publication
reflect_pg_publication_namespace
Asynchronously pull the contents of pg_publication_namespace
reflect_pg_publication_rel
Asynchronously pull the contents of pg_publication_rel
reflect_pg_range
Asynchronously pull the contents of pg_range
reflect_pg_roles
Asynchronously pull the contents of pg_roles
reflect_pg_rules
Asynchronously pull the contents of pg_rules
reflect_pg_sequence
Asynchronously pull the contents of pg_sequence
reflect_pg_statistic_ext
Asynchronously pull the contents of pg_statistic_ext
reflect_pg_subscription
Asynchronously pull the contents of pg_subscription
reflect_pg_transform
Asynchronously pull the contents of pg_transform
reflect_pg_trigger
Asynchronously pull the contents of pg_trigger
reflect_pg_ts_config
Asynchronously pull the contents of pg_ts_config
reflect_pg_ts_config_map
Asynchronously pull the contents of pg_ts_config_map
reflect_pg_ts_dict
Asynchronously pull the contents of pg_ts_dict
reflect_pg_ts_parser
Asynchronously pull the contents of pg_ts_parser
reflect_pg_ts_template
Asynchronously pull the contents of pg_ts_template
reflect_pg_type
Asynchronously pull the contents of pg_type
reflect_pg_user_mappings
Asynchronously pull the contents of pg_user_mappings
reflect_pg_views
Asynchronously pull the contents of pg_views

Type Aliases§

AclDefaultAclItem
AclDefaultGrant
DbAclItem
DbGrant
ForeignDataWrapperAclItem
ForeignDataWrapperGrant
ForeignServerAclItem
ForeignServerGrant
FunctionAclItem
FunctionGrant
LanguageAclItem
LanguageGrant
Map
ParameterAclItem
ParameterGrant
SchemaAclItem
SchemaGrant
Set
TableAclItem
TableColumnAclItem
TableColumnGrant
TableGrant
TypeAclItem
TypeGrant