Skip to content

gabrielfurlan-dev/PgsqlDataTypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PgsqlDataTypes

A POWERFUL Enum tool to make PostgreSQL developers life easier.

Use Guide

First of all, install the package on your projetct by nuget.

Typing on your CLI:

dotnet add package PgsqlDataTypes --version 1.0.0

Or accessing Nuget Packages website.

Just need to import the Enum in your workspace:

using PgsqlDataTypes;

Useful when you have to use Entity Framework and have to set the data types when mapping your models. Example:

 builder.Property(x => x.HumorStatus)
                    .IsRequired()
                    .HasColumnName("ColumnName")
                    .HasColumnType(EPgsqlDataTypes.BigInt.ToString()) //PostgreSQL Data Type
                    .HasMaxLength(1);

Enums also have descriptions in case you prefer uppercase text.

DataTypes

## TEXT
VARCHAR
TEXT

## NUMERIC
INT
SMALLINT
BIGINT
FLOAT
BOOLEAN
DECIMAL
NUMERIC
MONEY
REAL
SMALLSERIAL
SERIAL
BIGSERIAL

## DATE
TIME
DATE
TIMESTAMP
TIMESTAMPTZ

About

(My first Nuget Package). An enum tool to make PostgreSQL developers life easier.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages