Skip to content

Commit 35348ca

Browse files
committed
Added forward declaration for some SDK types
1 parent cdc8ddd commit 35348ca

File tree

26 files changed

+261
-43
lines changed

26 files changed

+261
-43
lines changed

include/ydb-cpp-sdk/client/driver/driver.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include "fwd.h"
4+
35
#include <ydb-cpp-sdk/client/common_client/settings.h>
46
#include <ydb-cpp-sdk/client/types/status_codes.h>
57
#include <ydb-cpp-sdk/client/types/credentials/credentials.h>
@@ -13,11 +15,8 @@
1315

1416
namespace NYdb::inline V3 {
1517

16-
class TDriver;
1718
class TGRpcConnectionsImpl;
1819

19-
////////////////////////////////////////////////////////////////////////////////
20-
2120
//! Represents configuration of YDB driver
2221
class TDriverConfig {
2322
friend class TDriver;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
3+
namespace NYdb::inline V3 {
4+
5+
class TDriver;
6+
class TDriverConfig;
7+
8+
} // namespace NYdb
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
3+
namespace NYdb::inline V3 {
4+
5+
class TParams;
6+
class TParamValueBuilder;
7+
class TParamsBuilder;
8+
9+
} // namespace NYdb

include/ydb-cpp-sdk/client/params/params.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include "fwd.h"
4+
35
#include <ydb-cpp-sdk/type_switcher.h>
46
#include <ydb-cpp-sdk/client/value/value.h>
57

@@ -32,8 +34,6 @@ namespace NQuery {
3234
class TQueryClient;
3335
}
3436

35-
class TParamsBuilder;
36-
3737
class TParams {
3838
friend class TParamsBuilder;
3939
friend class NTable::TTableClient;

include/ydb-cpp-sdk/client/query/client.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include "fwd.h"
4+
35
#include "query.h"
46
#include "tx.h"
57

@@ -27,7 +29,6 @@ struct TCreateSessionSettings : public TSimpleRequestSettings<TCreateSessionSett
2729
TCreateSessionSettings();
2830
};
2931

30-
class TCreateSessionResult;
3132
using TAsyncCreateSessionResult = NThreading::TFuture<TCreateSessionResult>;
3233
using TRetryOperationSettings = NYdb::NRetry::TRetryOperationSettings;
3334

@@ -55,7 +56,6 @@ struct TClientSettings : public TCommonClientSettingsBase<TClientSettings> {
5556
// ! This API is currently in experimental state and is a subject for changes.
5657
// ! No backward and/or forward compatibility guarantees are provided.
5758
// ! DO NOT USE for production workloads.
58-
class TSession;
5959
class TQueryClient {
6060
friend class TSession;
6161
friend class NRetry::Async::TRetryContext<TQueryClient, TAsyncExecuteQueryResult>;
@@ -126,7 +126,6 @@ class TQueryClient {
126126
std::shared_ptr<TImpl> Impl_;
127127
};
128128

129-
class TTransaction;
130129
class TSession {
131130
friend class TQueryClient;
132131
friend class TTransaction;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#pragma once
2+
3+
namespace NYdb::inline V3::NQuery {
4+
5+
struct TClientSettings;
6+
struct TSessionPoolSettings;
7+
struct TCreateSessionSettings;
8+
struct TExecuteQuerySettings;
9+
struct TBeginTxSettings;
10+
struct TCommitTxSettings;
11+
struct TRollbackTxSettings;
12+
struct TExecuteScriptSettings;
13+
struct TFetchScriptResultsSettings;
14+
struct TTxOnlineSettings;
15+
struct TTxSettings;
16+
17+
class TQueryClient;
18+
class TSession;
19+
20+
class TCreateSessionResult;
21+
class TBeginTransactionResult;
22+
class TExecuteQueryResult;
23+
class TCommitTransactionResult;
24+
class TFetchScriptResultsResult;
25+
26+
class TExecuteQueryPart;
27+
class TExecuteQueryIterator;
28+
29+
class TTransaction;
30+
struct TTxControl;
31+
32+
class TQueryContent;
33+
class TResultSetMeta;
34+
class TScriptExecutionOperation;
35+
class TExecStats;
36+
37+
} // namespace NYdb

include/ydb-cpp-sdk/client/query/query.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include "fwd.h"
4+
35
#include "stats.h"
46

57
#include <ydb-cpp-sdk/client/result/result.h>
@@ -46,7 +48,6 @@ enum class EExecStatus {
4648
Failed = 50,
4749
};
4850

49-
class TExecuteQueryPart;
5051
using TAsyncExecuteQueryPart = NThreading::TFuture<TExecuteQueryPart>;
5152

5253
class TExecuteQueryIterator : public TStatus {
@@ -88,8 +89,6 @@ class TCommitTransactionResult : public TStatus {
8889
TCommitTransactionResult(TStatus&& status);
8990
};
9091

91-
class TBeginTransactionResult;
92-
9392
using TAsyncBeginTransactionResult = NThreading::TFuture<TBeginTransactionResult>;
9493
using TAsyncCommitTransactionResult = NThreading::TFuture<TCommitTransactionResult>;
9594

@@ -182,7 +181,6 @@ class TFetchScriptResultsResult : public TStatus {
182181
std::string NextFetchToken_;
183182
};
184183

185-
class TExecuteQueryResult;
186184
using TAsyncFetchScriptResultsResult = NThreading::TFuture<TFetchScriptResultsResult>;
187185
using TAsyncExecuteQueryResult = NThreading::TFuture<TExecuteQueryResult>;
188186

include/ydb-cpp-sdk/client/query/stats.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include <optional>
77
#include <string>
88

9-
class TDuration;
10-
119
namespace Ydb::TableStats {
1210
class QueryStats;
1311
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
3+
namespace NYdb::inline V3 {
4+
5+
class TResultSet;
6+
class TResultSetParser;
7+
8+
} // namespace NYdb

include/ydb-cpp-sdk/client/result/result.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include "fwd.h"
4+
35
#include <ydb-cpp-sdk/client/value/value.h>
46

57
#include <string>

0 commit comments

Comments
 (0)