0.2.3 • Published 3 years ago
@nestjsi/typeorm-pg v0.2.3
typeorm-pg
TypeORM PostgreSQL declarations and utilities.
Examples
Safe naming strategy for TypeORM
import { SafeNamingStrategy } from '@nestjsi/typeorm-pg';
@Global()
@Module({
imports: [
TypeOrmModule.forRootAsync({
useFactory: async () =>
Object.assign(await getConnectionOptions(), {
namingStrategy: new SafeNamingStrategy(),
} as TypeOrmModuleAsyncOptions),
}),
],
})
export class AppModule {}
TypeORM column primary type
import { ColumnPrimaryType } from '@nestjsi/typeorm-pg';
enum ColumnPrimaryType {
BigInteger = "bigint",
Decimal = "decimal",
Integer = "integer",
SmallInteger = "smallint",
UUID = "uuid",
}
TypeORM column type
import { ColumnType } from '@nestjsi/typeorm-pg';
enum ColumnType {
BigInteger = "bigint",
Boolean = "boolean",
Decimal = "decimal",
DoublePrecision = "double precision",
Enum = "enum",
Float = "float",
Integer = "integer",
JSON = "json",
JSONB = "jsonb",
SmallInteger = "smallint",
Text = "text",
TimeStampWithTimeZone = "timestamp with time zone",
UUID = "uuid",
// and more…
}
Decorators
import {
Checks,
IndexColumns,
UniqueColumns,
} from '@nestjsi/typeorm-pg';
Useful constants
import {
EMAIL_LENGTH_MAX,
EMAIL_LENGTH_MIN,
// and more…
} from '@nestjsi/typeorm-pg';
0.2.1
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.0
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.2
3 years ago
0.1.3
3 years ago
0.1.0
3 years ago
0.1.1
3 years ago
0.0.8
3 years ago
0.0.5
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.4
3 years ago
0.0.1
3 years ago