You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support PostgreSQL for autoConfigEmulator (#2601)
* feat: support PostgreSQL for autoConfigEmulator
The autoConfigEmulator=true flag in the Connection API can be used to
automatically connect to the emulator and automatically create the
instance and database that is being referenced. This makes running a
quick test on the emulator much easier, as all you need to do is to
configure the correct (JDBC) connection URL, and it will automatically
work. This mode would always create a GoogleSQL database. This change
adds support for creating a PostgreSQL database if the user specifically
sets the dialect in the connection string.
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
"Automatically configure the connection to try to connect to the Cloud Spanner emulator (true/false). The instance and database in the connection string will automatically be created if these do not yet exist on the emulator.",
311
+
"Automatically configure the connection to try to connect to the Cloud Spanner emulator (true/false). "
312
+
+ "The instance and database in the connection string will automatically be created if these do not yet exist on the emulator. "
313
+
+ "Add dialect=postgresql to the connection string to make sure that the database that is created uses the PostgreSQL dialect.",
311
314
false),
312
315
ConnectionProperty.createBooleanProperty(
313
316
LENIENT_PROPERTY_NAME,
@@ -317,7 +320,8 @@ public String[] getValidValues() {
317
320
RPC_PRIORITY_NAME,
318
321
"Sets the priority for all RPC invocations from this connection (HIGH/MEDIUM/LOW). The default is HIGH."),
319
322
ConnectionProperty.createStringProperty(
320
-
DIALECT_PROPERTY_NAME, "Sets the dialect to use for this connection."),
323
+
DIALECT_PROPERTY_NAME,
324
+
"Sets the dialect to use for new databases that are created by this connection."),
321
325
ConnectionProperty.createStringProperty(
322
326
DATABASE_ROLE_PROPERTY_NAME,
323
327
"Sets the database role to use for this connection. The default is privileges assigned to IAM role"),
@@ -626,6 +630,7 @@ public static Builder newBuilder() {
0 commit comments