sequelize_orm 0.1.0 copy "sequelize_orm: ^0.1.0" to clipboard
sequelize_orm: ^0.1.0 copied to clipboard

A type-safe ORM for Dart powered by Sequelize. Supports PostgreSQL, MySQL, MariaDB, SQLite, and MSSQL with code generation, model annotations, associations, and query building.

0.1.0 #

Initial beta release of sequelize_orm.

Highlights #

  • Type-safe ORM for Dart powered by Sequelize (Node.js) via a JS bridge.
  • Support for PostgreSQL, MySQL, and MariaDB (SQLite, MSSQL, DB2 have Dart API stubs).

Sequelize Instance #

  • createInstance(), authenticate(), initialize(), sync(), close().
  • define(), addModels(), getModel().
  • truncate(), destroyAll(), seed().
  • SQL helpers: Sequelize.fn(), col(), literal(), cast(), attribute(), identifier(), random().

Models & Code Generation #

  • @Table annotation with full model options (timestamps, paranoid, underscored, freezeTableName, schema, engine, charset, version, and more).
  • Generates *Model, *Values, Create*, Update*, *Columns, *Query, and *IncludeHelper classes per model.
  • Static methods: findAll(), findOne(), create(), update(), destroy(), restore(), truncate(), count(), max(), min(), sum(), increment(), decrement().
  • Instance methods: save(), update(), destroy(), restore(), reload(), increment(), decrement(), toJson().

Associations #

  • @HasOne, @HasMany, @BelongsTo annotations with foreignKey, as, sourceKey, targetKey.
  • Eager loading via type-safe IncludeBuilder with nested includes, where, attributes, order, limit, separate, required, right join, and more.
  • BelongsTo mixin methods: getX(), setX(), createX().

Operators #

  • Logical: and(), or(), not().
  • Comparison: eq(), ne(), gt(), gte(), lt(), lte(), between(), notBetween(), in_(), notIn().
  • IS: isNull(), isNotNull(), isTrue(), isFalse(), isNotTrue(), isNotFalse().
  • String: like(), notLike(), iLike(), notILike(), startsWith(), endsWith(), substring().
  • Regex: regexp(), notRegexp(), iRegexp(), notIRegexp().
  • Misc: col(), match(), all(), any().

Data Types #

  • Integer: TINYINT, SMALLINT, MEDIUMINT, INTEGER, BIGINT (with UNSIGNED, ZEROFILL).
  • Decimal: FLOAT, DOUBLE, DECIMAL.
  • String: STRING, CHAR, TEXT (with variants).
  • Other: BOOLEAN, DATE, DATEONLY, UUID, JSON, JSONB, BLOB.

Attribute Annotations #

  • @PrimaryKey, @AutoIncrement, @AllowNull, @NotNull, @ColumnName, @Default, @Comment, @Unique, @Index.
  • Validation: @IsEmail, @IsUrl, @IsIP, @IsAlpha, @IsNumeric, @Len, @Min, @Max, @IsUUID, @IsIn, and more.

Paranoid (Soft Delete) #

  • Full support for soft delete with paranoid: true, custom deletedAt column, force delete, and restore.

Connection #

  • Pool configuration (max, min, idle, acquire, evict).
  • Full SSL/TLS support.
  • Dialect-specific options for PostgreSQL, MySQL, MariaDB, SQLite, MSSQL, and DB2.

Seeding #

  • sequelize.seed() with type-safe SequelizeSeeding base class, ordering, and sync modes.
2
likes
0
points
911
downloads

Publisher

unverified uploader

Weekly Downloads

A type-safe ORM for Dart powered by Sequelize. Supports PostgreSQL, MySQL, MariaDB, SQLite, and MSSQL with code generation, model annotations, associations, and query building.

Repository (GitHub)
View/report issues

Topics

#orm #database #sql #postgres #code-generation

License

unknown (license)

Dependencies

meta, path

More

Packages that depend on sequelize_orm