Skip to content

Commit

Permalink
3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaque Neves committed Apr 8, 2024
1 parent f473566 commit 0f0596b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ final manager = Manager();

## 3.0.0

- 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
- 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

## 3.0.1

- fix bug on query builder count()
9 changes: 5 additions & 4 deletions lib/src/query/query_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,7 @@ class QueryBuilder {
///
/// Retrieve the "count" result of the query.
///
/// @param String|List<String> $columns
/// @param String|List<String> columns
/// @return int
///
Future<int> count([dynamic columns = '*']) async {
Expand All @@ -1901,7 +1901,8 @@ class QueryBuilder {

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

///
Expand Down Expand Up @@ -2056,8 +2057,8 @@ class QueryBuilder {
/// @return int
///
Future<dynamic> insertGetId(Map<String, dynamic> keyValues,
[String sequence = 'id']) async{
final sql = this.grammar.compileInsertGetId(this, keyValues, sequence);
[String sequence = 'id']) async {
final sql = this.grammar.compileInsertGetId(this, keyValues, sequence);
final values = this.cleanBindings(keyValues.values.toList());
return await this.processor.processInsertGetId(this, sql, values, sequence);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: eloquent
version: 3.0.0
version: 3.0.1
description: eloquent query builder port from PHP Laravel
homepage: https://github.com/insinfo/eloquent_dart
#publish_to: none
Expand Down

0 comments on commit 0f0596b

Please sign in to comment.