Google Cloud Spanner C++ Client 2.13.0
A C++ Client Library for Google Cloud Spanner
Loading...
Searching...
No Matches
version.h
1// Copyright 2019 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_VERSION_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_VERSION_H
17
18#include "google/cloud/spanner/version_info.h"
19#include "google/cloud/internal/attributes.h"
20#include "google/cloud/version.h"
21#include <string>
22
23#define GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED(name)
24 GOOGLE_CLOUD_CPP_DEPRECATED(
25 "google::cloud::spanner::" name
26 " is deprecated, and will be removed on or shortly after 2022-10-01."
27 " Please use google::cloud::spanner_admin::" name
28 " instead. See GitHub issue #7356 for more information.")
29
30#define GOOGLE_CLOUD_CPP_SPANNER_MAKE_TEST_ROW_DEPRECATED()
31 GOOGLE_CLOUD_CPP_DEPRECATED(
32 "google::cloud::spanner::MakeTestRow() is deprecated, and"
33 " will be removed on or shortly after 2023-06-01. Please"
34 " use google::cloud::spanner_mocks::MakeRow() instead."
35 " See GitHub issue #9086 for more information.")
36
37// This preprocessor symbol is deprecated and should never be used anywhere. It
38// exists solely for backward compatibility to avoid breaking anyone who may
39// have been using it.
40#define SPANNER_CLIENT_NS GOOGLE_CLOUD_CPP_NS
41
42namespace google {
43namespace cloud {
44/**
45 * Contains all the Cloud Spanner C++ client types and functions.
46 */
47namespace spanner {
48GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
49
50/**
51 * The Cloud Spanner C++ Client major version.
52 */
53int constexpr VersionMajor() { return google::cloud::version_major(); }
54
55/**
56 * The Cloud Spanner C++ Client minor version.
57 */
58int constexpr VersionMinor() { return google::cloud::version_minor(); }
59
60/**
61 * The Cloud Spanner C++ Client patch version.
62 */
63int constexpr VersionPatch() { return google::cloud::version_patch(); }
64
65/**
66 * The Cloud Spanner C++ Client pre-release version.
67 */
68constexpr char const* VersionPreRelease() {
70}
71
72/// A single integer representing the Major/Minor/Patch version.
73int constexpr Version() { return google::cloud::version(); }
74
75/// The version as a string, in MAJOR.MINOR.PATCH[-PRE][+gitrev] format.
76std::string VersionString();
77
78GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
79// TODO(#7463) - remove backwards compatibility namespaces
80namespace v1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls)
81} // namespace spanner
82} // namespace cloud
83} // namespace google
84
85#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_VERSION_H
Contains all the Cloud Spanner C++ client types and functions.
Definition: backoff_policy.h:23
int constexpr VersionMinor()
The Cloud Spanner C++ Client minor version.
Definition: version.h:58
int constexpr Version()
A single integer representing the Major/Minor/Patch version.
Definition: version.h:73
std::string VersionString()
The version as a string, in MAJOR.MINOR.PATCH[-PRE][+gitrev] format.
int constexpr VersionPatch()
The Cloud Spanner C++ Client patch version.
Definition: version.h:63
constexpr char const * VersionPreRelease()
The Cloud Spanner C++ Client pre-release version.
Definition: version.h:68
int constexpr VersionMajor()
The Cloud Spanner C++ Client major version.
Definition: version.h:53
int constexpr version()
int constexpr version_minor()
int constexpr version_major()
constexpr char const * version_pre_release()
int constexpr version_patch()