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

+2-3
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;
+8
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
+9
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

+2-2
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

+2-3
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;
+37
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

+2-4
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

-2
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
}
+8
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

+2
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>
+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
#pragma once
2+
3+
namespace NYdb::inline V3::NTable {
4+
5+
class TKeyBound;
6+
class TKeyRange;
7+
8+
struct TTableColumn;
9+
struct TAlterTableColumn;
10+
11+
struct TPartitionStats;
12+
13+
struct TSequenceDescription;
14+
class TChangefeedDescription;
15+
class TIndexDescription;
16+
class TColumnFamilyDescription;
17+
class TTableDescription;
18+
19+
struct TExplicitPartitions;
20+
21+
struct TRenameIndex;
22+
23+
struct TGlobalIndexSettings;
24+
struct TVectorIndexSettings;
25+
struct TKMeansTreeSettings;
26+
struct TCreateSessionSettings;
27+
struct TSessionPoolSettings;
28+
struct TClientSettings;
29+
struct TBulkUpsertSettings;
30+
struct TReadRowsSettings;
31+
struct TStreamExecScanQuerySettings;
32+
struct TTxOnlineSettings;
33+
struct TCreateTableSettings;
34+
struct TDropTableSettings;
35+
struct TAlterTableSettings;
36+
struct TCopyTableSettings;
37+
struct TCopyTablesSettings;
38+
struct TRenameTablesSettings;
39+
struct TDescribeTableSettings;
40+
struct TExplainDataQuerySettings;
41+
struct TPrepareDataQuerySettings;
42+
struct TExecDataQuerySettings;
43+
struct TExecSchemeQuerySettings;
44+
struct TBeginTxSettings;
45+
struct TCommitTxSettings;
46+
struct TRollbackTxSettings;
47+
struct TCloseSessionSettings;
48+
struct TKeepAliveSettings;
49+
struct TReadTableSettings;
50+
51+
class TPartitioningSettings;
52+
class TDateTypeColumnModeSettings;
53+
class TValueSinceUnixEpochModeSettings;
54+
class TTtlTierSettings;
55+
class TTtlSettings;
56+
class TAlterTtlSettings;
57+
class TStorageSettings;
58+
class TReadReplicasSettings;
59+
class TTxSettings;
60+
61+
struct TColumnFamilyPolicy;
62+
struct TStoragePolicy;
63+
struct TPartitioningPolicy;
64+
struct TReplicationPolicy;
65+
66+
class TBuildIndexOperation;
67+
68+
class TTtlDeleteAction;
69+
class TTtlEvictToExternalStorageAction;
70+
71+
class TStorageSettingsBuilder;
72+
class TPartitioningSettingsBuilder;
73+
class TColumnFamilyBuilder;
74+
class TTableStorageSettingsBuilder;
75+
class TTableColumnFamilyBuilder;
76+
class TTablePartitioningSettingsBuilder;
77+
class TTableBuilder;
78+
class TAlterStorageSettingsBuilder;
79+
class TAlterColumnFamilyBuilder;
80+
class TAlterTtlSettingsBuilder;
81+
class TAlterAttributesBuilder;
82+
class TAlterPartitioningSettingsBuilder;
83+
84+
class TPrepareQueryResult;
85+
class TExplainQueryResult;
86+
class TDescribeTableResult;
87+
class TDataQueryResult;
88+
class TBeginTransactionResult;
89+
class TCommitTransactionResult;
90+
class TCreateSessionResult;
91+
class TKeepAliveResult;
92+
class TBulkUpsertResult;
93+
class TReadRowsResult;
94+
95+
template<typename TPart>
96+
class TSimpleStreamPart;
97+
98+
class TScanQueryPart;
99+
100+
class TTablePartIterator;
101+
class TScanQueryPartIterator;
102+
103+
class TReadTableSnapshot;
104+
105+
class TCopyItem;
106+
class TRenameItem;
107+
108+
class TDataQuery;
109+
110+
class TTransaction;
111+
class TTxControl;
112+
113+
class TSession;
114+
class TTableClient;
115+
116+
} // namespace NYdb

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

+2-27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

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

57
#include <ydb-cpp-sdk/client/driver/driver.h>
@@ -643,9 +645,6 @@ class TReadReplicasSettings {
643645
uint64_t ReadReplicasCount_;
644646
};
645647

646-
struct TExplicitPartitions;
647-
struct TDescribeTableSettings;
648-
649648
enum class EStoreType {
650649
Row = 0,
651650
Column = 1
@@ -826,8 +825,6 @@ class TColumnFamilyBuilder {
826825

827826
////////////////////////////////////////////////////////////////////////////////
828827

829-
class TTableBuilder;
830-
831828
class TTableStorageSettingsBuilder {
832829
public:
833830
explicit TTableStorageSettingsBuilder(TTableBuilder& parent)
@@ -1071,19 +1068,6 @@ class TRenameItem {
10711068

10721069
////////////////////////////////////////////////////////////////////////////////
10731070

1074-
class TCreateSessionResult;
1075-
class TDataQueryResult;
1076-
class TTablePartIterator;
1077-
class TPrepareQueryResult;
1078-
class TExplainQueryResult;
1079-
class TDescribeTableResult;
1080-
class TBeginTransactionResult;
1081-
class TCommitTransactionResult;
1082-
class TKeepAliveResult;
1083-
class TBulkUpsertResult;
1084-
class TReadRowsResult;
1085-
class TScanQueryPartIterator;
1086-
10871071
using TAsyncCreateSessionResult = NThreading::TFuture<TCreateSessionResult>;
10881072
using TAsyncDataQueryResult = NThreading::TFuture<TDataQueryResult>;
10891073
using TAsyncPrepareQueryResult = NThreading::TFuture<TPrepareQueryResult>;
@@ -1177,9 +1161,6 @@ struct TStreamExecScanQuerySettings : public TRequestSettings<TStreamExecScanQue
11771161
FLUENT_SETTING_DEFAULT(bool, CollectFullDiagnostics, false);
11781162
};
11791163

1180-
class TSession;
1181-
class TSessionPool;
1182-
11831164
enum class EDataFormat {
11841165
ApacheArrow = 1,
11851166
CSV = 2,
@@ -1287,8 +1268,6 @@ class TTableClient {
12871268

12881269
////////////////////////////////////////////////////////////////////////////////
12891270

1290-
class TTransaction;
1291-
12921271
struct TTxOnlineSettings {
12931272
using TSelf = TTxOnlineSettings;
12941273

@@ -1367,8 +1346,6 @@ class TTxSettings {
13671346
ETransactionMode Mode_;
13681347
};
13691348

1370-
class TTxControl;
1371-
13721349
enum class EAutoPartitioningPolicy {
13731350
Disabled = 1,
13741351
AutoSplit = 2,
@@ -1457,8 +1434,6 @@ struct TDropTableSettings : public TOperationRequestSettings<TDropTableSettings>
14571434

14581435
////////////////////////////////////////////////////////////////////////////////
14591436

1460-
struct TAlterTableSettings;
1461-
14621437
class TAlterStorageSettingsBuilder {
14631438
public:
14641439
explicit TAlterStorageSettingsBuilder(TAlterTableSettings& parent)

include/ydb-cpp-sdk/client/types/credentials/credentials.h

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include <ydb-cpp-sdk/client/types/fwd.h>
4+
35
#include <memory>
46
#include <string>
57

0 commit comments

Comments
 (0)