|
17 | 17 |
|
18 | 18 | #include "google/cloud/bigtable/bound_query.h" |
19 | 19 | #include "google/cloud/bigtable/instance_resource.h" |
20 | | -#include "google/cloud/bigtable/internal/query_plan.h" |
21 | 20 | #include "google/cloud/bigtable/sql_statement.h" |
22 | 21 | #include "google/cloud/bigtable/value.h" |
23 | 22 | #include "google/cloud/bigtable/version.h" |
|
28 | 27 |
|
29 | 28 | namespace google { |
30 | 29 | namespace cloud { |
| 30 | +namespace bigtable_internal { |
| 31 | +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN |
| 32 | +class QueryPlan; |
| 33 | +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END |
| 34 | +} // namespace bigtable_internal |
31 | 35 | namespace bigtable { |
32 | 36 | GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN |
33 | 37 |
|
34 | 38 | // Represents a long-lived query execution plan. |
35 | 39 | // Query plans can expire and are refreshed as a background task. |
36 | 40 | class PreparedQuery { |
37 | 41 | public: |
38 | | - // Creates an instance of BoundQuery using the query plan ID from the |
39 | | - // response. |
40 | | - BoundQuery BindParameters( |
41 | | - std::unordered_map<std::string, Value> params) const; |
42 | | - |
43 | | - // Accessors |
44 | | - InstanceResource const& instance() const; |
45 | | - SqlStatement const& sql_statement() const; |
46 | | - |
47 | 42 | PreparedQuery(InstanceResource instance, SqlStatement sql_statement, |
48 | 43 | std::shared_ptr<bigtable_internal::QueryPlan> query_plan) |
49 | 44 | : instance_(std::move(instance)), |
50 | 45 | sql_statement_(std::move(sql_statement)), |
51 | 46 | query_plan_(std::move(query_plan)) {} |
52 | 47 |
|
| 48 | + // Accessors |
| 49 | + InstanceResource const& instance() const { return instance_; } |
| 50 | + SqlStatement const& sql_statement() const { return sql_statement_; } |
| 51 | + |
| 52 | + // Creates an instance of BoundQuery using the query plan ID from the |
| 53 | + // response. |
| 54 | + BoundQuery BindParameters( |
| 55 | + std::unordered_map<std::string, Value> params) const; |
| 56 | + |
53 | 57 | private: |
54 | 58 | InstanceResource instance_; |
55 | 59 | SqlStatement sql_statement_; |
|
0 commit comments