diff --git a/packages/orm/angel_orm_mysql/CHANGELOG.md b/packages/orm/angel_orm_mysql/CHANGELOG.md index 6108653b..e717a7bd 100644 --- a/packages/orm/angel_orm_mysql/CHANGELOG.md +++ b/packages/orm/angel_orm_mysql/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 7.0.1 + +* Reduced debugging verbosity + ## 7.0.0 * Require Dart >= 2.17 diff --git a/packages/orm/angel_orm_mysql/lib/src/orm_mariadb.dart b/packages/orm/angel_orm_mysql/lib/src/orm_mariadb.dart index ca440f75..e268cc64 100644 --- a/packages/orm/angel_orm_mysql/lib/src/orm_mariadb.dart +++ b/packages/orm/angel_orm_mysql/lib/src/orm_mariadb.dart @@ -45,9 +45,9 @@ class MariaDbExecutor extends QueryExecutor { } } - logger.warning('Query: $query'); - logger.warning('Values: $params'); - logger.warning('Returning Query: $returningQuery'); + //logger.warning('Query: $query'); + //logger.warning('Values: $params'); + //logger.warning('Returning Query: $returningQuery'); if (returningQuery.isNotEmpty) { // Handle insert, update and delete @@ -77,17 +77,14 @@ class MariaDbExecutor extends QueryExecutor { @override Future transaction(FutureOr Function(QueryExecutor) f) async { T? returnValue = await _connection.transaction((ctx) async { - // TODO: To be relooked at try { - logger.fine('Entering transaction'); + //logger.fine('Entering transaction'); //var tx = MariaDbExecutor(conn, logger: logger); _transactionContext = ctx; return await f(this); } catch (e) { logger.severe('Failed to run transaction', e); rethrow; - } finally { - logger.fine('Exiting transaction'); } }); diff --git a/packages/orm/angel_orm_mysql/lib/src/orm_mysql.dart b/packages/orm/angel_orm_mysql/lib/src/orm_mysql.dart index 8e932702..2949eb7a 100644 --- a/packages/orm/angel_orm_mysql/lib/src/orm_mysql.dart +++ b/packages/orm/angel_orm_mysql/lib/src/orm_mysql.dart @@ -88,8 +88,8 @@ class MySqlExecutor extends QueryExecutor { var value = substitutionValues[name]; if (value is DateTime && value.isUtc) { var t = value.toLocal(); - logger.warning('Datetime deteted: $name'); - logger.warning('Datetime: UTC -> $value, Local -> $t'); + //logger.warning('Datetime deteted: $name'); + //logger.warning('Datetime: UTC -> $value, Local -> $t'); substitutionValues[name] = t; } @@ -98,9 +98,9 @@ class MySqlExecutor extends QueryExecutor { //var params = substitutionValues.values.toList(); //var params = []; - logger.warning('Query: $query'); - logger.warning('Values: $substitutionValues'); - //logger?.warning('Returning Query: $returningQuery'); + //logger.warning('Query: $query'); + //logger.warning('Values: $substitutionValues'); + //logger.warning('Returning Query: $returningQuery'); if (returningQuery.isNotEmpty) { // Handle insert, update and delete @@ -108,10 +108,10 @@ class MySqlExecutor extends QueryExecutor { if (query.startsWith("INSERT")) { var result = await _connection.execute(query, substitutionValues); - logger.warning(result.lastInsertID); + //logger.fine(result.lastInsertID); query = returningQuery; - //logger?.warning('Result.insertId: ${result.insertId}'); + //logger.fine('Result.insertId: ${result.insertId}'); // Has primary key if (returningQuery.endsWith('.id=?')) { query = query.replaceAll("?", ":id"); @@ -126,15 +126,15 @@ class MySqlExecutor extends QueryExecutor { } } - logger.warning('Query 2: $query'); - logger.warning('Values 2: $substitutionValues'); + //logger.warning('Query 2: $query'); + //logger.warning('Values 2: $substitutionValues'); // Handle select return _connection.execute(query, substitutionValues).then((results) { - var tmpData = results.rows; - for (var element in tmpData) { - logger.warning("[Result] : ${element.assoc()}"); - } + // var tmpData = results.rows; + //for (var element in tmpData) { + // logger.warning("[Result] : ${element.assoc()}"); + //} return results.rows.map((r) => r.typedAssoc().values.toList()).toList(); }); @@ -153,18 +153,16 @@ class MySqlExecutor extends QueryExecutor { @override Future transaction(FutureOr Function(QueryExecutor) f) async { - logger.warning("Transaction"); + //logger.warning("Transaction"); T? returnValue = await _connection.transactional((ctx) async { try { - logger.fine('Entering transaction'); + //logger.fine('Entering transaction'); var tx = MySqlExecutor(ctx, logger: logger); return await f(tx); } catch (e) { logger.severe('Failed to run transaction', e); rethrow; - } finally { - logger.fine('Exiting transaction'); } }); diff --git a/packages/orm/angel_orm_mysql/pubspec.yaml b/packages/orm/angel_orm_mysql/pubspec.yaml index 681ab9f6..361e8cb4 100644 --- a/packages/orm/angel_orm_mysql/pubspec.yaml +++ b/packages/orm/angel_orm_mysql/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_orm_mysql -version: 7.0.0 +version: 7.0.1 description: MySQL support for Angel3 ORM. Includes functionality for querying and transactions. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_mysql diff --git a/packages/orm/angel_orm_postgres/CHANGELOG.md b/packages/orm/angel_orm_postgres/CHANGELOG.md index ad8e609d..fa49ab95 100644 --- a/packages/orm/angel_orm_postgres/CHANGELOG.md +++ b/packages/orm/angel_orm_postgres/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 7.0.1 + +* Reduced debugging verbosity + ## 7.0.0 * Require Dart >= 2.17 diff --git a/packages/orm/angel_orm_postgres/lib/src/orm_postgres.dart b/packages/orm/angel_orm_postgres/lib/src/orm_postgres.dart index 947df50a..f84e0345 100644 --- a/packages/orm/angel_orm_postgres/lib/src/orm_postgres.dart +++ b/packages/orm/angel_orm_postgres/lib/src/orm_postgres.dart @@ -107,7 +107,7 @@ class PostgreSqlExecutor extends QueryExecutor { var txResult = await conn.transaction((ctx) async { try { - logger.fine('Entering transaction'); + //logger.fine('Entering transaction'); var tx = PostgreSqlExecutor(ctx, logger: logger); returnValue = await f(tx); @@ -115,8 +115,6 @@ class PostgreSqlExecutor extends QueryExecutor { } catch (e) { ctx.cancelTransaction(reason: e.toString()); rethrow; - } finally { - logger.fine('Exiting transaction'); } }); @@ -176,7 +174,7 @@ class PostgreSqlExecutorPool extends QueryExecutor { Future _open() async { if (_connections.isEmpty) { _connections.addAll(await Future.wait(List.generate(size, (_) async { - logger.fine('Spawning connections...'); + //logger.fine('Spawning connections...'); var conn = connectionFactory(); await conn.open(); //return conn diff --git a/packages/orm/angel_orm_postgres/pubspec.yaml b/packages/orm/angel_orm_postgres/pubspec.yaml index 90973de6..2d16865c 100644 --- a/packages/orm/angel_orm_postgres/pubspec.yaml +++ b/packages/orm/angel_orm_postgres/pubspec.yaml @@ -1,5 +1,5 @@ name: angel3_orm_postgres -version: 7.0.0 +version: 7.0.1 description: PostgreSQL support for Angel3 ORM. Includes functionality for querying and transactions. homepage: https://angel3-framework.web.app/ repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_postgres