Skip to main content

Definition

Assembly: CloudNimble.BlazorEssentials.TursoDb.dll Namespace: CloudNimble.BlazorEssentials.TursoDb Inheritance: System.Attribute

Syntax

CloudNimble.BlazorEssentials.TursoDb.ColumnAttribute

Summary

Specifies the column name and optional type for a property. If not specified, the property name is used as the column name.

Constructors

.ctor

Initializes a new instance of the ColumnAttribute class.

Syntax

public ColumnAttribute(string name)

Parameters

NameTypeDescription
namestringThe column name in the database.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when name is null or whitespace.

Properties

DefaultValue

Gets or sets the default value for the column.

Syntax

public string DefaultValue { get; set; }

Property Value

Type: string?

Name

Gets the column name in the database.

Syntax

public string Name { get; }

Property Value

Type: string

Nullable

Gets or sets whether the column allows NULL values. If not specified, nullability is inferred from the property type.

Syntax

public System.Nullable<bool> Nullable { get; set; }

Property Value

Type: System.Nullable<bool>?

Type

Gets or sets the SQLite column type (e.g., “TEXT”, “INTEGER”, “REAL”, “BLOB”). If not specified, the type is inferred from the property type.

Syntax

public string Type { get; set; }

Property Value

Type: string?