Class PostgresExtension
Represents the metadata for a PostgreSQL extension.
Namespace: Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public class PostgresExtension
Properties
| Improve this Doc View SourceAnnotatable
The Annotatable that stores the extension.
Declaration
public virtual Annotatable Annotatable { get; }
Property Value
Type | Description |
---|---|
Annotatable |
Name
The extension name.
Declaration
public virtual string Name { get; }
Property Value
Type | Description |
---|---|
string |
Schema
The extension schema or null to represent the default schema.
Declaration
public virtual string? Schema { get; }
Property Value
Type | Description |
---|---|
string? |
Version
The extension version.
Declaration
public virtual string? Version { get; set; }
Property Value
Type | Description |
---|---|
string? |
Methods
| Improve this Doc View SourceFindPostgresExtension(IReadOnlyAnnotatable, string?, string)
Finds a PostgresExtension in the
Declaration
public static PostgresExtension? FindPostgresExtension(IReadOnlyAnnotatable annotatable, string? schema, string name)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyAnnotatable | annotatable | The annotatable to search for the extension. |
string? | schema | The extension schema. The default schema is never used. |
string | name | The extension name. |
Returns
Type | Description |
---|---|
PostgresExtension | The PostgresExtension from the |
GetOrAddPostgresExtension(IConventionAnnotatable, string?, string, string?)
Gets or adds a PostgresExtension from or to the
Declaration
public static PostgresExtension GetOrAddPostgresExtension(IConventionAnnotatable annotatable, string? schema, string name, string? version)
Parameters
Type | Name | Description |
---|---|---|
IConventionAnnotatable | annotatable | The annotatable from which to get or add the extension. |
string? | schema | The extension schema or null to use the model's default schema. |
string | name | The extension name. |
string? | version | The extension version. |
Returns
Type | Description |
---|---|
PostgresExtension | The PostgresExtension from the |
GetOrAddPostgresExtension(IMutableAnnotatable, string?, string, string?)
Gets or adds a PostgresExtension from or to the
Declaration
public static PostgresExtension GetOrAddPostgresExtension(IMutableAnnotatable annotatable, string? schema, string name, string? version)
Parameters
Type | Name | Description |
---|---|---|
IMutableAnnotatable | annotatable | The annotatable from which to get or add the extension. |
string? | schema | The extension schema or null to use the model's default schema. |
string | name | The extension name. |
string? | version | The extension version. |
Returns
Type | Description |
---|---|
PostgresExtension | The PostgresExtension from the |
GetOrAddPostgresExtension(IMutableAnnotatable, string, string?)
Gets or adds a PostgresExtension from or to the
Declaration
public static PostgresExtension GetOrAddPostgresExtension(IMutableAnnotatable annotatable, string name, string? version)
Parameters
Type | Name | Description |
---|---|---|
IMutableAnnotatable | annotatable | The annotatable from which to get or add the extension. |
string | name | The extension name. |
string? | version | The extension version. |
Returns
Type | Description |
---|---|
PostgresExtension | The PostgresExtension from the |
GetPostgresExtensions(IReadOnlyAnnotatable)
Gets the collection of PostgresExtension stored in the
Declaration
public static IEnumerable<PostgresExtension> GetPostgresExtensions(IReadOnlyAnnotatable annotatable)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyAnnotatable | annotatable | The annotatable to search for PostgresExtension annotations. |
Returns
Type | Description |
---|---|
IEnumerable<><PostgresExtension> | The collection of PostgresExtension stored in the |