Skip to content

Commit 0f0596b

Browse files
author
Isaque Neves
committed
3.0.1
1 parent f473566 commit 0f0596b

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,8 @@ final manager = Manager();
7272

7373
## 3.0.0
7474

75-
- implemented support for mysql through the 'mysql_client' package and also implemented support for posgress with the postgres v3 package, now you can choose the driver implementation through ``` 'driver_implementation': 'postgres_v3', ``` in addConnection method
75+
- implemented support for mysql through the 'mysql_client' package and also implemented support for posgress with the postgres v3 package, now you can choose the driver implementation through ``` 'driver_implementation': 'postgres_v3', ``` in addConnection method
76+
77+
## 3.0.1
78+
79+
- fix bug on query builder count()

lib/src/query/query_builder.dart

+5-4
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,7 @@ class QueryBuilder {
18901890
///
18911891
/// Retrieve the "count" result of the query.
18921892
///
1893-
/// @param String|List<String> $columns
1893+
/// @param String|List<String> columns
18941894
/// @return int
18951895
///
18961896
Future<int> count([dynamic columns = '*']) async {
@@ -1901,7 +1901,8 @@ class QueryBuilder {
19011901

19021902
//__FUNCTION__ The function name, or {closure} for anonymous functions.
19031903
//a constant __FUNCTION__ retorna o nome da corrent função https://www.php.net/manual/en/language.constants.magic.php
1904-
return await this.aggregate('count', columns);
1904+
final result = await this.aggregate('count', columns);
1905+
return result is int ? result : 0;
19051906
}
19061907

19071908
///
@@ -2056,8 +2057,8 @@ class QueryBuilder {
20562057
/// @return int
20572058
///
20582059
Future<dynamic> insertGetId(Map<String, dynamic> keyValues,
2059-
[String sequence = 'id']) async{
2060-
final sql = this.grammar.compileInsertGetId(this, keyValues, sequence);
2060+
[String sequence = 'id']) async {
2061+
final sql = this.grammar.compileInsertGetId(this, keyValues, sequence);
20612062
final values = this.cleanBindings(keyValues.values.toList());
20622063
return await this.processor.processInsertGetId(this, sql, values, sequence);
20632064
}

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: eloquent
2-
version: 3.0.0
2+
version: 3.0.1
33
description: eloquent query builder port from PHP Laravel
44
homepage: https://github.com/insinfo/eloquent_dart
55
#publish_to: none

0 commit comments

Comments
 (0)