sqfentity 1.2.0+10 sqfentity: ^1.2.0+10 copied to clipboard
SqfEntity ORM for Flutter/Dart lets you build and execute SQL commands easily and quickly with the help of fluent methods similar to .Net Entity Framework.
1.2.0+10 #
bug fix: fixed error in convertDatabaseToModelBase()
1.2.0+8 #
added getDatabasePath() method example:
final String dbPath = await MyDbModel().getDatabasePath();
1.2.0+6 #
When the application was initialize initializeDB() method is performed automatically in this version. You no longer need to call this method before start application
1.2.0+4 #
bug fix
1.2.0+2 #
added DateTime dbType
SqfEntityField('birthDate', DbType.datetime),
added Date (Small Date) dbType
SqfEntityField('birthDate', DbType.date),
1.2.0+1 #
modified dependencies (merged sqfentity_base with sqfentity_gen)
1.1.1+2 #
modified dependencies (removed sqfentity_gen, added sqfentity_base, downgrade path version to 1.6.2)
1.1.1 #
Added function to generate model from existing database
1.1.0+4 #
bug fix
1.1.0+2 #
implemented source_gen for model generate
1.0.5 #
fixed some bugs
1.0.4+1 #
added toJsonWithChilds() method
1.0.3 #
added toMapWithChilds() method
1.0.2 #
added toJson() method
final product = await Product().select().toSingle();
final jsonString = await product.toJson();
print("EXAMPLE 11.1 single object to Json\n product jsonString is: $jsonString");
final jsonStringWithChilds = await Category().select().toJson(); // all categories selected
print("EXAMPLE 11.2 object list with nested objects to Json\n categories jsonString is: $jsonStringWithChilds");
1.0.1+3 #
added fromJson() method
1.0.0+1 #
Example of linking a column to a sequence
This is sample sequence in model
class SequenceIdentity extends SqfEntitySequence {
SequenceIdentity() {
sequenceName = "identity";
maxValue = 10; /* optional. default is max int (9.223.372.036.854.775.807) */
cycle = true; /* optional. default is false; */
//minValue = 0; /* optional. default is 0 */
//incrementBy = 1; /* optional. default is 1 */
// startWith = 0; /* optional. default is 0 */
super.init();
}
static SequenceIdentity _instance;
static SequenceIdentity get getInstance {
if (_instance == null) {
_instance = SequenceIdentity();
}
return _instance;
}
}
How to linking a column to a sequence?
SqfEntityField("rownum", DbType.integer, sequencedBy: SequenceIdentity()
0.2.7+1 #
added some features and methods:
- SEQUENCE Generator
- dbModel.execScalar()
0.2.6 #
added String Primary Key Type WARNING: change the
primaryKeyType = PrimaryKeyType.integer_auto_incremental;
instead of
primaryKeyisIdentity = true
0.2.5+1 #
Fixed some bugs
0.2.4+1 #
New useful methods added dbModel.execSQL(sql), dbModel.execSQLList(sql) and dbModel.execDataTable(sql) see example at https://github.com/hhtokpinar/sqfEntity/blob/master/README.md#run-sql-raw-query-on-database-or-get-datatable
0.2.3 #
WARNING! toCount() return type (BoolResult) changed to (int)
0.2.2 #
startsWith(), endsWith() and contains() methods modified
0.2.1 #
optional parameter added to delete() method delete([bool hardDelete=false])
0.2.0 #
toListString() method added this method Returns List
0.1.0+22 #
dependencies modified
0.1.0+21 #
.fromWebUrl method modified
0.1.0+20 #
dependencies modified
0.1.0+18 #
recover() and delete() methods updated
0.1.0+13 #
create_model.dart modified
0.1.0+12 #
README.md and example/main.dart modified
0.1.0+11 #
README.md and example/main.dart modified
0.1.0+10 #
README.md and example/main.dart modified
0.1.0+9 #
README.md and example/main.dart modified
0.1.0+8 #
README.md and example/main.dart modified
0.1.0+7 #
README.md and example/main.dart modified
0.1.0+6 #
README.md modified
0.1.0+5 #
README.md modified
0.0.5+5 #
README.md modified
0.0.5+4 #
README.md modified
0.0.5+3 #
README.md modified
0.0.5+2 #
README.md modified
0.0.5+1 #
- toList(), toSingle(), getById(), initializeDb(), fromWeb().. etc methods are replaced with async method
0.0.4+1 #
README.md modified
0.0.3+1 #
README.md modified
0.0.2+1 #
README.md modified
0.0.1 #
- Initial experimentation