Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.sql.v1.SqlDatabasesDeleteRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.sql.v1.SqlDatabasesGetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.sql.v1.SqlDatabasesInsertRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.sql.v1.SqlDatabasesListRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.sql.v1.SqlDatabasesUpdateRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.sql.v1.SqlDatabasesUpdateRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis document outlines the \u003ccode\u003eSqlDatabasesServiceClient\u003c/code\u003e class, which provides methods for managing databases within a Cloud SQL instance, covering versions from 2.11.0 up to the latest release candidate 2.37.0-rc.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSqlDatabasesServiceClient\u003c/code\u003e class offers functions to perform operations on Cloud SQL databases, including \u003ccode\u003eDelete\u003c/code\u003e, \u003ccode\u003eGet\u003c/code\u003e, \u003ccode\u003eInsert\u003c/code\u003e, \u003ccode\u003eList\u003c/code\u003e, \u003ccode\u003ePatch\u003c/code\u003e, and \u003ccode\u003eUpdate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe document emphasizes that creating a new instance of \u003ccode\u003eSqlDatabasesServiceClient\u003c/code\u003e is resource-intensive, but copying or moving existing instances is efficient, sharing the same underlying resources.\u003c/p\u003e\n"],["\u003cp\u003eConcurrent access to different instances of the class is safe, but concurrent operations on the same instance by multiple threads are not guaranteed to work, therefore making use of copies is recommended in such cases.\u003c/p\u003e\n"],["\u003cp\u003eEach function within \u003ccode\u003eSqlDatabasesServiceClient\u003c/code\u003e, like \u003ccode\u003eDelete\u003c/code\u003e, \u003ccode\u003eGet\u003c/code\u003e, or \u003ccode\u003eInsert\u003c/code\u003e, requires a specific request message (e.g., \u003ccode\u003eSqlDatabasesDeleteRequest\u003c/code\u003e) and may return a \u003ccode\u003eStatusOr\u003c/code\u003e object containing either the result of the operation or any error details.\u003c/p\u003e\n"]]],[],null,["# Class SqlDatabasesServiceClient (2.33.0)\n\nVersion 2.33.0keyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/sql/latest/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.41.0](/cpp/docs/reference/sql/2.41.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.40.0](/cpp/docs/reference/sql/2.40.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.39.0](/cpp/docs/reference/sql/2.39.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.38.0](/cpp/docs/reference/sql/2.38.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.37.0](/cpp/docs/reference/sql/2.37.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.36.0](/cpp/docs/reference/sql/2.36.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.35.0](/cpp/docs/reference/sql/2.35.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.34.0](/cpp/docs/reference/sql/2.34.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.33.0](/cpp/docs/reference/sql/2.33.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.32.0](/cpp/docs/reference/sql/2.32.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.31.0](/cpp/docs/reference/sql/2.31.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.30.0](/cpp/docs/reference/sql/2.30.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.29.0](/cpp/docs/reference/sql/2.29.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.28.0](/cpp/docs/reference/sql/2.28.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.27.0](/cpp/docs/reference/sql/2.27.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.26.0](/cpp/docs/reference/sql/2.26.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.25.1](/cpp/docs/reference/sql/2.25.1/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.24.0](/cpp/docs/reference/sql/2.24.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.23.0](/cpp/docs/reference/sql/2.23.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.22.1](/cpp/docs/reference/sql/2.22.1/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.21.0](/cpp/docs/reference/sql/2.21.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.20.0](/cpp/docs/reference/sql/2.20.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.19.0](/cpp/docs/reference/sql/2.19.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.18.0](/cpp/docs/reference/sql/2.18.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.17.0](/cpp/docs/reference/sql/2.17.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.16.0](/cpp/docs/reference/sql/2.16.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.15.1](/cpp/docs/reference/sql/2.15.1/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.14.0](/cpp/docs/reference/sql/2.14.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.13.0](/cpp/docs/reference/sql/2.13.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.12.0](/cpp/docs/reference/sql/2.12.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient)\n- [2.11.0](/cpp/docs/reference/sql/2.11.0/classgoogle_1_1cloud_1_1sql__v1_1_1SqlDatabasesServiceClient) \nService to manage databases. \n\n###### Equality\n\nInstances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal `std::shared_ptr\u003c*Connection\u003e` objects compare equal. Objects that compare equal share the same underlying resources.\n\n###### Performance\n\nCreating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.\n\n###### Thread Safety\n\nConcurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.\n\nConstructors\n------------\n\n### SqlDatabasesServiceClient(SqlDatabasesServiceClient const \\&)\n\nCopy and move support\n\n### SqlDatabasesServiceClient(SqlDatabasesServiceClient \\&\\&)\n\nCopy and move support\n\n### SqlDatabasesServiceClient(std::shared_ptr\\\u003c SqlDatabasesServiceConnection \\\u003e, Options)\n\nOperators\n---------\n\n### operator=(SqlDatabasesServiceClient const \\&)\n\nCopy and move support\n\n### operator=(SqlDatabasesServiceClient \\&\\&)\n\nCopy and move support\n\nFunctions\n---------\n\n### Delete(google::cloud::sql::v1::SqlDatabasesDeleteRequest const \\&, Options)\n\nDeletes a database from a Cloud SQL instance.\n\n### Get(google::cloud::sql::v1::SqlDatabasesGetRequest const \\&, Options)\n\nRetrieves a resource containing information about a database inside a Cloud SQL instance.\n\n### Insert(google::cloud::sql::v1::SqlDatabasesInsertRequest const \\&, Options)\n\nInserts a resource containing information about a database inside a Cloud SQL instance. \n**Note:** You can't modify the default character set and collation.\n\n### List(google::cloud::sql::v1::SqlDatabasesListRequest const \\&, Options)\n\nLists databases in the specified Cloud SQL instance.\n\n### Patch(google::cloud::sql::v1::SqlDatabasesUpdateRequest const \\&, Options)\n\nPartially updates a resource containing information about a database inside a Cloud SQL instance. \nThis method supports patch semantics.\n\n### Update(google::cloud::sql::v1::SqlDatabasesUpdateRequest const \\&, Options)\n\nUpdates a resource containing information about a database inside a Cloud SQL instance."]]