Skip to content

ianprogrammer/typeorm-sequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typeorm-sequence

THIS LIBRARY IS NO LONGER MAINTAINED Typeorm-sequence is a library that enables you to use a db sequence in a column (it works only on postgres and oracle yet).

Install via NPM

  npm i typeorm-sequence

Usage

import { Entity, Column, PrimaryColumn } from 'typeorm'
import { NextVal, EntityWithSequence } from 'typeorm-sequence'

@Entity({ name: 'client_table' })
export class Client extends EntityWithSequence {

  @NextVal('seq_client')
  @PrimaryColumn({ name: 'client_id' })
  id: number

  @Column({ name: 'client_name' })
  name: string
  constructor() {
    super()
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published