File tree Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -29,4 +29,6 @@ doc/api/
29
29
main.exe
30
30
teste_concorrencia.dart
31
31
teste_utils.dart
32
- teste_insert_get_id.dart
32
+ teste_insert_get_id.dart
33
+
34
+ example/bin/teste_insert_get_id.dart
Original file line number Diff line number Diff line change @@ -86,4 +86,8 @@ final manager = Manager();
86
86
87
87
- fix bugs in onOpen callback to configure connection settings
88
88
- improvements to README
89
- - implemented connection pool for 'postgres' (v2) driver_implementation
89
+ - implemented connection pool for 'postgres' (v2) driver_implementation
90
+
91
+ ## 3.2.1
92
+
93
+ - fix bug on format Schema
Original file line number Diff line number Diff line change @@ -115,9 +115,9 @@ class PostgresConnector extends Connector implements ConnectorInterface {
115
115
}
116
116
117
117
if (config['schema' ] != null ) {
118
- dsn += ";schema=${config ['schema' ]}" ;
118
+ dsn += ";schema=${formatSchema ( config ['schema' ]) }" ;
119
119
}
120
-
120
+
121
121
if (config['timezone' ] != null ) {
122
122
dsn += ";timezone=${config ['timezone' ]}" ;
123
123
}
@@ -132,11 +132,20 @@ class PostgresConnector extends Connector implements ConnectorInterface {
132
132
/// @return string
133
133
///
134
134
String formatSchema (dynamic schema) {
135
- if (Utils .is_array (schema)) {
136
- return '"' + Utils .implode ('", "' , schema) + '"' ;
135
+ String result = '' ;
136
+ if (schema is List <String >) {
137
+ result = schema.map ((e) => '"$e "' ).join (',' );
138
+ } else if (schema is String ) {
139
+ if (schema.contains (',' )) {
140
+ final parts = schema.split (',' );
141
+ result = parts.map ((e) => '"$e "' ).join (',' );
142
+ } else {
143
+ result = '"$schema "' ;
144
+ }
137
145
} else {
138
- return '"' + schema + '"' ;
146
+ throw Exception ( 'schema is not String or List<String>' ) ;
139
147
}
148
+ return result;
140
149
}
141
150
142
151
///
Original file line number Diff line number Diff line change 1
1
name : eloquent
2
- version : 3.2.0
2
+ version : 3.2.1
3
3
description : eloquent query builder port from PHP Laravel
4
4
homepage : https://github.com/insinfo/eloquent_dart
5
5
# publish_to: none
You can’t perform that action at this time.
0 commit comments