AvatarModelDao class

Inheritance

Constructors

AvatarModelDao([String? tableName])

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
table String
no setterinherited

Methods

addColumn(String field) → void
add the new column for table, the filed just like 'name Text'
inherited
clear([String? tableName]) Future<void>
清空表所有数据
inherited
delete(AvatarModel? t, [String? tableName]) Future<int>
删除数据
inherited
drop([String? tableName]) Future<void>
删除表所有数据
inherited
execute(String sql, [List<Object?>? arguments]) Future<void>
执行sql语句
inherited
fromJson(Map json) AvatarModel
override
insert(AvatarModel? t, [String? tableName]) Future<int>
插入单个model
inherited
insertAll(List<AvatarModel?> t, {String? tableName, String? nullColumnHack, ConflictAlgorithm? conflictAlgorithm = ConflictAlgorithm.replace}) Future<int>
插入所有model
inherited
insertMap(Map<String, dynamic> t, [String? tableName]) Future<int>
插入map
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onUpgrade(int oldVersion, int newVersion) FutureOr<void>
增加表更新的方法,这里只是回调到每个dao类中,一个dao类一个表,针对当前表进行更新
inherited
query({String? tableName, bool? distinct, List<String>? columns, String? where, List<Object?>? whereArgs, String? groupBy, String? having, String? orderBy, int? limit, int? offset}) Future<List<AvatarModel>?>
调用sqflite 封装好的查询
inherited
queryAll([String? tableName]) Future<List<AvatarModel>?>
查询该表的所有数据
inherited
queryCount([String? tableName]) Future<int>
查询该表的总数
inherited
queryOne(Object arg, [String? tableName]) Future<AvatarModel?>
根据id,查询一个
inherited
random([String? tableName]) Future<AvatarModel?>
随机获取一个数据
inherited
randoms(int count, [String? tableName]) Future<List<AvatarModel>?>
随机查询一组数据
inherited
rawQuery(String sql, [List<Object?>? arguments]) Future<List<AvatarModel>?>
调用sql语句执行
inherited
toString() String
A string representation of this object.
inherited
update(AvatarModel? t, [String? tableName]) Future<int>
更新map
inherited
updateAll(List<AvatarModel>? t, {String? tableName, ConflictAlgorithm? conflictAlgorithm = ConflictAlgorithm.replace}) Future<int>
更新所有数据库
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

tableSql([String? tableName]) String