Definition
Assembly: CloudNimble.BlazorEssentials.TursoDb.dll Namespace: CloudNimble.BlazorEssentials.TursoDb.Schema Inheritance: System.ObjectSyntax
Summary
Contains metadata about an entity type for database operations.Constructors
.ctor
Initializes a new instance of the EntityMetadata class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entityType | System.Type | The entity type to analyze. |
.ctor Inherited
Inherited from
objectSyntax
Properties
Columns
Gets the list of columns in the entity.Syntax
Property Value
Type:System.Collections.Generic.IReadOnlyList<CloudNimble.BlazorEssentials.TursoDb.Schema.ColumnMetadata>
EntityType
Gets the entity type.Syntax
Property Value
Type:System.Type
NonKeyColumns
Gets the columns that are not the primary key.Syntax
Property Value
Type:System.Collections.Generic.IReadOnlyList<CloudNimble.BlazorEssentials.TursoDb.Schema.ColumnMetadata>
PrimaryKey
Gets the primary key column, or null if none.Syntax
Property Value
Type:CloudNimble.BlazorEssentials.TursoDb.Schema.ColumnMetadata?
TableName
Gets the table name in the database.Syntax
Property Value
Type:string
Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetInsertData
Gets the column values for insert, excluding auto-increment primary keys with default values.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entity | object | The entity instance. |
Returns
Type:(string, string, object?[])
Column names, placeholders, and parameter values.
GetPrimaryKeyValue
Gets the primary key value from an entity.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entity | object | The entity instance. |
Returns
Type:object?
The primary key value.
Exceptions
| Exception | Description |
|---|---|
InvalidOperationException | Thrown when no primary key is defined. |
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
GetUpdateData
Gets the column values for update, excluding the primary key.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entity | object | The entity instance. |
Returns
Type:(string, object?[])
SET clause and parameter values including the primary key.
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
SetPrimaryKeyValue
Sets the primary key value on an entity.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entity | object | The entity instance. |
value | object? | The primary key value. |
Exceptions
| Exception | Description |
|---|---|
InvalidOperationException | Thrown when no primary key is defined. |
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?