SQLQuery class
Used for selecting a range of records from the SDK's database. Used with the methods Logger.getLog, Logger.emailLog and Logger.uploadLog.
// Constrain results between optionl start/end dates using a SQLQuery
String log = await Logger.getLog(SQLQuery(
start: DateTime.parse('2019-10-21 13:00'), // <-- optional HH:mm:ss
end: DateTime.parse('2019-10-22')
));
// Or just a start date
String log = await Logger.getLog(SQLQuery(
start: DateTime.parse('2019-10-21 13:00')
));
// Or just an end date
Logger.uploadLog("http://my.server.com/users/123/logs", SQLQuery(
end: DateTime.parse('2019-10-21')
));
// Select first 100 records from log
Logger.emailLog("foo@bar.com", SQLQuery(
order: SQLQuery.ORDER_ASC,
limit: 100
));
// Select most recent 100 records from log
Logger.emailLog("foo@bar.com", SQLQuery(
order: SQLQuery.ORDER_DESC,
limit: 100
));
Properties
- end ↔ DateTime?
-
End date of logs to select.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- limit ↔ int?
-
Limit number of records returned.
getter/setter pair
- order ↔ int?
-
Ordering of results SQLQuery.ORDER_ASC or SQLQuery.ORDER_DESC.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start ↔ DateTime?
-
Start date of logs to select
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
Return
Map
representation ofSQLQuery
for communication to native platform. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- ORDER_ASC → const int
- ORDER_DESC → const int