@ Override public CloudSpannerConnection connect ( String url , Properties info ) throws SQLException { if ( ! acceptsURL ( url ) ) return null ; // Parse URL ConnectionProperties properties = ConnectionProperties . parse ( url ) ; // Get connection properties from properties properties . setAdditionalConnectionProperties ( info ) ; CloudSpannerDatabaseSpecification database = new CloudSpannerDatabaseSpecification ( properties . project , properties . instance , properties . database ) ; CloudSpannerConnection connection = new CloudSpannerConnection ( this , url , database , properties . keyFile , properties . oauthToken , info , properties . useCustomHost ) ; connection . setSimulateProductName ( properties . productName ) ; connection . setSimulateMajorVersion ( properties . majorVersion ) ; connection . setSimulateMinorVersion ( properties . minorVersion ) ; connection . setAllowExtendedMode ( properties . allowExtendedMode ) ; connection . setOriginalAllowExtendedMode ( properties . allowExtendedMode ) ; connection . setAsyncDdlOperations ( properties . asyncDdlOperations ) ; connection . setOriginalAsyncDdlOperations ( properties . asyncDdlOperations ) ; connection . setAutoBatchDdlOperations ( properties . autoBatchDdlOperations ) ; connection . setOriginalAutoBatchDdlOperations ( properties . autoBatchDdlOperations ) ; connection . setReportDefaultSchemaAsNull ( properties . reportDefaultSchemaAsNull ) ; connection . setOriginalReportDefaultSchemaAsNull ( properties . reportDefaultSchemaAsNull ) ; connection . setBatchReadOnly ( properties . batchReadOnlyMode ) ; connection . setOriginalBatchReadOnly ( properties . batchReadOnlyMode ) ; connection . setUseCustomHost ( properties . useCustomHost ) ; registerConnection ( connection ) ; return connection ; }
Connects to a Google Cloud Spanner database .