google-cloud-oracle_database 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/google/cloud/oracle_database/version.rb +1 -1
- data/lib/google/cloud/oracle_database.rb +19 -9
- data/lib/google-cloud-oracle_database.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e3f118374ed7c841a4d73e4feebefd45580f03e1cd7b8d0dbd8963d070be487
|
|
4
|
+
data.tar.gz: acbe5ea4b97d70157138a5af991640443af0616d0f28b5adb37c548acf5b02a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01e134a34f96ca5c683e0a480c01916dab5123042591b34eb39c908bbff36491f0e540d45a213d7d55eb6a18d8db48c8f29f7ee5214654674dbad603a2d8c2e0
|
|
7
|
+
data.tar.gz: '00081a3ca023e1ba255f7c1b18234317f8e34f3e7a17d6d9cc592aec40b98a5c7bfeedbd52edb4a45e75ff915fe037868442e8ea0b34bc5a9b6123b63496fc0e'
|
data/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle database services, such as Exadata and Autonomous Databases.
|
|
4
4
|
|
|
5
|
-
The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle database services, such as Exadata and Autonomous Databases.
|
|
6
5
|
|
|
7
6
|
Actual client classes for the various versions of this API are defined in
|
|
8
7
|
_versioned_ client gems, with names of the form `google-cloud-oracle_database-v*`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -34,6 +34,7 @@ require "google/cloud/config"
|
|
|
34
34
|
config.add_field! :scope, nil, match: [::Array, ::String]
|
|
35
35
|
config.add_field! :lib_name, nil, match: ::String
|
|
36
36
|
config.add_field! :lib_version, nil, match: ::String
|
|
37
|
+
config.add_field! :interceptors, nil, match: ::Array
|
|
37
38
|
config.add_field! :timeout, nil, match: ::Numeric
|
|
38
39
|
config.add_field! :metadata, nil, match: ::Hash
|
|
39
40
|
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
|
|
@@ -48,15 +49,17 @@ module Google
|
|
|
48
49
|
# Create a new client object for OracleDatabase.
|
|
49
50
|
#
|
|
50
51
|
# By default, this returns an instance of
|
|
51
|
-
# [Google::Cloud::OracleDatabase::V1::OracleDatabase::
|
|
52
|
-
# for a
|
|
52
|
+
# [Google::Cloud::OracleDatabase::V1::OracleDatabase::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-oracle_database-v1/latest/Google-Cloud-OracleDatabase-V1-OracleDatabase-Client)
|
|
53
|
+
# for a gRPC client for version V1 of the API.
|
|
53
54
|
# However, you can specify a different API version by passing it in the
|
|
54
55
|
# `version` parameter. If the OracleDatabase service is
|
|
55
56
|
# supported by that API version, and the corresponding gem is available, the
|
|
56
57
|
# appropriate versioned client will be returned.
|
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
59
|
+
# the `transport` parameter.
|
|
57
60
|
#
|
|
58
61
|
# Raises an exception if the currently installed versioned client gem for the
|
|
59
|
-
# given API version does not support the OracleDatabase service.
|
|
62
|
+
# given API version does not support the given transport of the OracleDatabase service.
|
|
60
63
|
# You can determine whether the method will succeed by calling
|
|
61
64
|
# {Google::Cloud::OracleDatabase.oracle_database_available?}.
|
|
62
65
|
#
|
|
@@ -66,9 +69,10 @@ module Google
|
|
|
66
69
|
#
|
|
67
70
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
68
71
|
# Defaults to `:v1`.
|
|
72
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
69
73
|
# @return [::Object] A client object for the specified version.
|
|
70
74
|
#
|
|
71
|
-
def self.oracle_database version: :v1, &block
|
|
75
|
+
def self.oracle_database version: :v1, transport: :grpc, &block
|
|
72
76
|
require "google/cloud/oracle_database/#{version.to_s.downcase}"
|
|
73
77
|
|
|
74
78
|
package_name = Google::Cloud::OracleDatabase
|
|
@@ -76,7 +80,8 @@ module Google
|
|
|
76
80
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
77
81
|
.first
|
|
78
82
|
service_module = Google::Cloud::OracleDatabase.const_get(package_name).const_get(:OracleDatabase)
|
|
79
|
-
service_module.const_get(:Rest)
|
|
83
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
84
|
+
service_module.const_get(:Client).new(&block)
|
|
80
85
|
end
|
|
81
86
|
|
|
82
87
|
##
|
|
@@ -88,9 +93,10 @@ module Google
|
|
|
88
93
|
#
|
|
89
94
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
90
95
|
# Defaults to `:v1`.
|
|
96
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
91
97
|
# @return [boolean] Whether the service is available.
|
|
92
98
|
#
|
|
93
|
-
def self.oracle_database_available? version: :v1
|
|
99
|
+
def self.oracle_database_available? version: :v1, transport: :grpc
|
|
94
100
|
require "google/cloud/oracle_database/#{version.to_s.downcase}"
|
|
95
101
|
package_name = Google::Cloud::OracleDatabase
|
|
96
102
|
.constants
|
|
@@ -100,8 +106,10 @@ module Google
|
|
|
100
106
|
service_module = Google::Cloud::OracleDatabase.const_get package_name
|
|
101
107
|
return false unless service_module.const_defined? :OracleDatabase
|
|
102
108
|
service_module = service_module.const_get :OracleDatabase
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
if transport == :rest
|
|
110
|
+
return false unless service_module.const_defined? :Rest
|
|
111
|
+
service_module = service_module.const_get :Rest
|
|
112
|
+
end
|
|
105
113
|
service_module.const_defined? :Client
|
|
106
114
|
rescue ::LoadError
|
|
107
115
|
false
|
|
@@ -119,6 +127,8 @@ module Google
|
|
|
119
127
|
# The library name as recorded in instrumentation and logging.
|
|
120
128
|
# * `lib_version` (*type:* `String`) -
|
|
121
129
|
# The library version as recorded in instrumentation and logging.
|
|
130
|
+
# * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
|
|
131
|
+
# An array of interceptors that are run before calls are executed.
|
|
122
132
|
# * `timeout` (*type:* `Numeric`) -
|
|
123
133
|
# Default timeout in seconds.
|
|
124
134
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) -
|