0.0.16 • Published 1 year ago

@gradii/fedaco v0.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Fedaco Orm

No short description right now. can play fedaco here https://github.com/gradii/play-fedaco

How To Use It

  • setup a connection
    const db = new DatabaseConfig();
    db.addConnection({
      'driver'  : 'sqlite',
      'database': ':memory:'
    });
    db.bootFedaco();
    db.setAsGlobal();
  • define a model

    @Table({
      tableName: 'user'
    })
    class User extends Model {
      @PrimaryColumn
      id;
      
      @Column()
      email;
    
      @Column()
      name;
    
      @Column()
      age;
    
      @CreatedAtColumn()
      created_at;
    
      @UpdateAtColumn()
      updated_at;
    }
  • fetch data

    const list = await User.createQuery().get();

Create Table

create a user table.

const schemaBuilder = Model.getConnectionResolver()
  .connection(connectionName)
  .getSchemaBuilder();
;

await schemaBuilder().create('users', table => {
  table.increments('id');
  table.string('email').withUnique();
  table.string('name');
  table.string('age');
});

Features

  • wrapped driver. unify all driver query api
  • compile query builder to sql
  • decorate to define model
  • soft delete
  • use relationship to link model
  • relation can set dynamic constrain
  • sqlite and mysql support

Progressing

  • postgres full support
  • mssql full support
  • migration
0.0.15

1 year ago

0.0.16

1 year ago

0.0.14-beta.0

1 year ago

0.0.14-beta.1

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.12

1 year ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

3 years ago

0.0.4

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.1-beta.6

3 years ago