Table of Contents

Class ColumnAttribute

Namespace
Supabase.Postgrest.Attributes
Assembly
Supabase.Postgrest.dll

Used to map a C# property to a Postgrest Column.

[AttributeUsage(AttributeTargets.Property)]
public class ColumnAttribute : Attribute
Inheritance
ColumnAttribute
Inherited Members

Examples

class User : BaseModel {
    [ColumnName("firstName")]
    public string FirstName {get; set;}
}

Constructors

ColumnAttribute(string?, NullValueHandling, bool, bool)

public ColumnAttribute(string? columnName = null, NullValueHandling nullValueHandling = NullValueHandling.Include, bool ignoreOnInsert = false, bool ignoreOnUpdate = false)

Parameters

columnName string
nullValueHandling NullValueHandling
ignoreOnInsert bool
ignoreOnUpdate bool

Properties

ColumnName

The name in postgres of this column.

public string ColumnName { get; }

Property Value

string

IgnoreOnInsert

If the performed query is an Insert or Upsert, should this value be ignored?

public bool IgnoreOnInsert { get; }

Property Value

bool

IgnoreOnUpdate

If the performed query is an Update, should this value be ignored?

public bool IgnoreOnUpdate { get; }

Property Value

bool

NullValueHandling

Specifies what should be serialized in the event this column's value is NULL

public NullValueHandling NullValueHandling { get; set; }

Property Value

NullValueHandling