Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 649718b

Browse files
committed
Added a default value for bindings arguments.
1 parent de62cfc commit 649718b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9-
## [0.3.3] - 2018年12月08日
10-
### Added
9+
## [0.3.3] - 2019年01月21日
10+
### Changed
11+
- Added a default value for the bindings argument in `SQLiteDatabase#execSQL()`
12+
- Added a default value for the bindings argument in `SQLiteDatabase#rawQuery()`
1113

1214
## [0.3.2] - 2018年12月08日
1315
### Changed

‎lib/src/database.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ abstract class SQLiteDatabase implements SQLiteClosable {
225225
/// It has no means to return any data (such as the number of affected rows).
226226
///
227227
/// See: https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase#execSQL(java.lang.String)
228-
Future<void> execSQL(final String sql, [final List<dynamic> args]) {
228+
Future<void> execSQL(final String sql, [final List<dynamic> args=const []]) {
229229
final Map<String, dynamic> request = <String, dynamic>{'id': id, 'sql': sql, 'args': args};
230230
return _channel.invokeMethod('execSQL', request);
231231
}
@@ -423,7 +423,7 @@ abstract class SQLiteDatabase implements SQLiteClosable {
423423
/// Runs the provided SQL and returns a cursor over the result set.
424424
///
425425
/// See: https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase#rawQuery(java.lang.String,%20java.lang.String[])
426-
Future<SQLiteCursor> rawQuery(final String sql, [final List<String> args]) async {
426+
Future<SQLiteCursor> rawQuery(final String sql, [final List<String> args=const<String>[]]) async {
427427
final Map<String, dynamic> request = <String, dynamic>{'id': id, 'sql': sql, 'args': args};
428428
final List<dynamic> result = await _channel.invokeMethod('rawQuery', request);
429429
assert(result.length == 2);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /