15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_H
18#include "google/cloud/spanner/instance.h"
19#include "google/cloud/spanner/version.h"
20#include "google/cloud/status_or.h"
27GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
30
31
32
33
34
35
36
37
38
39
40
41
42
46
47
48
52
53
54
55
56
57
58 Database(std::string project_id, std::string instance_id,
59 std::string database_id);
73 std::string
const&
database_id()
const {
return database_id_; }
76
77
78
88 friend std::ostream& operator<<(std::ostream&,
Database const&);
92 std::string database_id_;
96
97
98
101GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
This class identifies a Cloud Spanner Database.
Definition: database.h:43
std::string const & database_id() const
Returns the Database ID.
Definition: database.h:73
Database(std::string project_id, std::string instance_id, std::string database_id)
Constructs a Database object identified by the given IDs.
Database(Database const &)=default
Database & operator=(Database const &)=default
Instance const & instance() const
Returns the Instance containing this database.
Definition: database.h:70
Database(Instance instance, std::string database_id)
Constructs a Database object identified by the given instance and database_id.
friend bool operator!=(Database const &a, Database const &b)
std::string FullName() const
Returns the fully qualified database name as a string of the form: "projects/<project-id>/instances/<...
Database(Database &&)=default
friend bool operator==(Database const &a, Database const &b)
Database & operator=(Database &&)=default
This class identifies a Cloud Spanner Instance.
Definition: instance.h:42
Contains all the Cloud Spanner C++ client types and functions.
Definition: backoff_policy.h:23
StatusOr< Database > MakeDatabase(std::string const &full_name)
Constructs a Database from the given full_name.