Skip to content

Commit

Permalink
Moved util public headers to include dir (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazizonoki authored Apr 22, 2024
1 parent ee73e9f commit f9e7321
Show file tree
Hide file tree
Showing 820 changed files with 1,568 additions and 1,543 deletions.
4 changes: 2 additions & 2 deletions examples/secondary_index/secondary_index_generate.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "secondary_index.h"

#include <src/util/random/random.h>
#include <src/util/thread/pool.h>
#include <ydb-cpp-sdk/util/random/random.h>
#include <ydb-cpp-sdk/util/thread/pool.h>

using namespace NLastGetopt;
using namespace NYdb;
Expand Down
6 changes: 3 additions & 3 deletions examples/secondary_index_builtin/secondary_index.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#include <src/library/getopt/last_getopt.h>
#include <string>
#include <src/util/generic/yexception.h>
#include <src/util/stream/output.h>
#include <src/util/string/builder.h>
#include <ydb-cpp-sdk/util/generic/yexception.h>
#include <ydb-cpp-sdk/util/stream/output.h>
#include <ydb-cpp-sdk/util/string/builder.h>

#define TABLE_USERS "users"
#define TABLE_SERIES "series"
Expand Down
2 changes: 1 addition & 1 deletion examples/secondary_index_builtin/secondary_index_fill.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "secondary_index.h"

#include <src/util/random/random.h>
#include <ydb-cpp-sdk/util/random/random.h>

using namespace NYdb;
using namespace NYdb::NTable;
Expand Down
2 changes: 1 addition & 1 deletion examples/ttl/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <ydb-cpp-sdk/client/table/table.h>

#include <src/util/folder/pathsplit.h>
#include <src/util/generic/yexception.h>
#include <ydb-cpp-sdk/util/generic/yexception.h>

namespace NExample {

Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/client/iam/common/iam.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <ydb-cpp-sdk/library/jwt/jwt.h>
#include <ydb-cpp-sdk/util/datetime/base.h>

#include <src/util/system/spinlock.h>
#include <src/util/string/builder.h>
#include <ydb-cpp-sdk/util/system/spinlock.h>
#include <ydb-cpp-sdk/util/string/builder.h>

#include <fstream>

Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/client/operation/operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <ydb-cpp-sdk/client/driver/driver.h>
#include <ydb-cpp-sdk/client/types/operation/operation.h>

#include <src/util/string/builder.h>
#include <ydb-cpp-sdk/util/string/builder.h>

namespace NYdb {
namespace NOperation {
Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/client/query/tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <ydb-cpp-sdk/client/types/fluent_settings_helpers.h>

#include <src/util/stream/output.h>
#include <ydb-cpp-sdk/util/stream/output.h>

#include <optional>

Expand Down
22 changes: 11 additions & 11 deletions include/ydb-cpp-sdk/client/table/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ class TChangefeedDescription {
TChangefeedDescription& WithInitialScan();
// Attributes
TChangefeedDescription& AddAttribute(const std::string& key, const std::string& value);
TChangefeedDescription& SetAttributes(const THashMap<std::string, std::string>& attrs);
TChangefeedDescription& SetAttributes(THashMap<std::string, std::string>&& attrs);
TChangefeedDescription& SetAttributes(const std::unordered_map<std::string, std::string>& attrs);
TChangefeedDescription& SetAttributes(std::unordered_map<std::string, std::string>&& attrs);
// Value that will be emitted in the `awsRegion` field of the record in DynamoDBStreamsJson format
TChangefeedDescription& WithAwsRegion(const std::string& value);

Expand All @@ -240,7 +240,7 @@ class TChangefeedDescription {
bool GetVirtualTimestamps() const;
const std::optional<TDuration>& GetResolvedTimestamps() const;
bool GetInitialScan() const;
const THashMap<std::string, std::string>& GetAttributes() const;
const std::unordered_map<std::string, std::string>& GetAttributes() const;
const std::string& GetAwsRegion() const;

void SerializeTo(Ydb::Table::Changefeed& proto) const;
Expand All @@ -263,7 +263,7 @@ class TChangefeedDescription {
std::optional<TDuration> ResolvedTimestamps_;
std::optional<TDuration> RetentionPeriod_;
bool InitialScan_ = false;
THashMap<std::string, std::string> Attributes_;
std::unordered_map<std::string, std::string> Attributes_;
std::string AwsRegion_;
};

Expand Down Expand Up @@ -520,7 +520,7 @@ class TTableDescription {
const std::vector<TColumnFamilyDescription>& GetColumnFamilies() const;

// Attributes
const THashMap<std::string, std::string>& GetAttributes() const;
const std::unordered_map<std::string, std::string>& GetAttributes() const;

// Returns partitioning settings of the table
const TPartitioningSettings& GetPartitioningSettings() const;
Expand Down Expand Up @@ -564,8 +564,8 @@ class TTableDescription {
void SetStorageSettings(const TStorageSettings& settings);
void AddColumnFamily(const TColumnFamilyDescription& desc);
void AddAttribute(const std::string& key, const std::string& value);
void SetAttributes(const THashMap<std::string, std::string>& attrs);
void SetAttributes(THashMap<std::string, std::string>&& attrs);
void SetAttributes(const std::unordered_map<std::string, std::string>& attrs);
void SetAttributes(std::unordered_map<std::string, std::string>&& attrs);
void SetCompactionPolicy(const std::string& name);
void SetUniformPartitions(ui64 partitionsCount);
void SetPartitionAtKeys(const TExplicitPartitions& keys);
Expand Down Expand Up @@ -787,8 +787,8 @@ class TTableBuilder {
TTableBuilder& AddColumnFamily(const TColumnFamilyDescription& desc);

TTableBuilder& AddAttribute(const std::string& key, const std::string& value);
TTableBuilder& SetAttributes(const THashMap<std::string, std::string>& attrs);
TTableBuilder& SetAttributes(THashMap<std::string, std::string>&& attrs);
TTableBuilder& SetAttributes(const std::unordered_map<std::string, std::string>& attrs);
TTableBuilder& SetAttributes(std::unordered_map<std::string, std::string>&& attrs);

TTableBuilder& SetCompactionPolicy(const std::string& name);

Expand Down Expand Up @@ -1379,7 +1379,7 @@ class TAlterAttributesBuilder {

private:
TAlterTableSettings& Parent_;
THashMap<std::string, std::string> AlterAttributes_;
std::unordered_map<std::string, std::string> AlterAttributes_;
};

class TAlterPartitioningSettingsBuilder {
Expand Down Expand Up @@ -1422,7 +1422,7 @@ class TAlterPartitioningSettingsBuilder {

struct TAlterTableSettings : public TOperationRequestSettings<TAlterTableSettings> {
using TSelf = TAlterTableSettings;
using TAlterAttributes = THashMap<std::string, std::string>;
using TAlterAttributes = std::unordered_map<std::string, std::string>;

TAlterTableSettings();

Expand Down
6 changes: 3 additions & 3 deletions include/ydb-cpp-sdk/client/topic/topic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include <ydb-cpp-sdk/library/monlib/dynamic_counters/counters.h>
#include <ydb-cpp-sdk/library/logger/log.h>
#include <ydb-cpp-sdk/library/retry/retry_policy.h>
#include <src/util/string/builder.h>
#include <ydb-cpp-sdk/util/string/builder.h>

#include <ydb-cpp-sdk/util/datetime/base.h>
#include <ydb-cpp-sdk/util/generic/size_literals.h>
#include <src/util/thread/pool.h>
#include <ydb-cpp-sdk/util/thread/pool.h>

#include <exception>
#include <variant>
Expand Down Expand Up @@ -626,7 +626,7 @@ struct TWriteSessionMeta: public TThrRefBase {
using TPtr = TIntrusivePtr<TWriteSessionMeta>;

//! User defined fields.
THashMap<std::string, std::string> Fields;
std::unordered_map<std::string, std::string> Fields;
};

struct TMessageMeta: public TThrRefBase {
Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/client/types/exceptions/exceptions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <src/util/generic/yexception.h>
#include <ydb-cpp-sdk/util/generic/yexception.h>

namespace NYdb {

Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/library/cgiparam/cgiparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <ydb-cpp-sdk/library/iterator/iterate_values.h>

#include <src/util/generic/iterator_range.h>
#include <ydb-cpp-sdk/util/generic/iterator_range.h>
#include <string_view>
#include <string>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <src/util/memory/alloc.h>
#include <src/util/ysaveload.h>
#include <ydb-cpp-sdk/util/memory/alloc.h>
#include <ydb-cpp-sdk/util/ysaveload.h>

#include <type_traits>

Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/library/coroutine/listener/listen.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <src/util/generic/ptr.h>
#include <ydb-cpp-sdk/util/generic/ptr.h>
#include <ydb-cpp-sdk/util/generic/ylimits.h>

struct TIpAddress;
Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/library/grpc/client/grpc_client_low.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include "grpc_common.h"

#include <src/util/thread/factory.h>
#include <src/util/string/builder.h>
#include <ydb-cpp-sdk/util/thread/factory.h>
#include <ydb-cpp-sdk/util/string/builder.h>
#include <grpc++/grpc++.h>
#include <grpc++/support/async_stream.h>
#include <grpc++/support/async_unary_call.h>
Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/library/http/fetch/httpheader.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#include <ydb-cpp-sdk/library/mime/types/mime.h>

#include <ydb-cpp-sdk/util/system/defaults.h>
#include <src/util/system/compat.h>
#include <ydb-cpp-sdk/util/system/compat.h>
#include <string>
#include <ydb-cpp-sdk/util/generic/ylimits.h>
#include <src/util/system/maxlen.h>
#include <ydb-cpp-sdk/util/system/maxlen.h>

#include <ctime>
#include <cstdio>
Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/library/http/io/headers.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include <src/util/string/builder.h>
#include <ydb-cpp-sdk/util/string/builder.h>

#include <string>
#include <string_view>

#include <src/util/string/cast.h>
#include <ydb-cpp-sdk/util/string/cast.h>

class IInputStream;
class IOutputStream;
Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/library/http/io/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

#include "headers.h"

#include <src/util/stream/output.h>
#include <ydb-cpp-sdk/util/stream/output.h>
#include <span>
#include <string>
#include <string_view>
#include <src/util/generic/yexception.h>
#include <ydb-cpp-sdk/util/generic/yexception.h>

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/library/http/server/conn.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <ydb-cpp-sdk/library/http/io/stream.h>
#include <src/util/generic/ptr.h>
#include <ydb-cpp-sdk/util/generic/ptr.h>

class TSocket;

Expand Down
6 changes: 3 additions & 3 deletions include/ydb-cpp-sdk/library/http/server/http.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include "conn.h"
#include "options.h"

#include <src/util/thread/pool.h>
#include <ydb-cpp-sdk/util/thread/pool.h>
#include <ydb-cpp-sdk/library/http/io/stream.h>
#include <src/util/memory/blob.h>
#include <src/util/generic/ptr.h>
#include <ydb-cpp-sdk/util/memory/blob.h>
#include <ydb-cpp-sdk/util/generic/ptr.h>

#include <ydb-cpp-sdk/library/deprecated/atomic/atomic.h>

Expand Down
6 changes: 3 additions & 3 deletions include/ydb-cpp-sdk/library/http/server/options.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <src/util/network/ip.h>
#include <src/util/network/init.h>
#include <src/util/network/address.h>
#include <ydb-cpp-sdk/util/network/ip.h>
#include <ydb-cpp-sdk/util/network/init.h>
#include <ydb-cpp-sdk/util/network/address.h>
#include <ydb-cpp-sdk/util/generic/size_literals.h>

#include <ydb-cpp-sdk/util/datetime/base.h>
Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/library/iterator/mapped.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <src/util/generic/iterator_range.h>
#include <src/util/generic/store_policy.h>
#include <ydb-cpp-sdk/util/generic/iterator_range.h>
#include <ydb-cpp-sdk/util/generic/store_policy.h>

#include <functional>
#include <iterator>
Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/library/json/common/defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <string_view>
#include <src/util/generic/yexception.h>
#include <ydb-cpp-sdk/util/generic/yexception.h>

namespace NJson {
class TJsonException: public yexception {
Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/library/json/json_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <ydb-cpp-sdk/library/json/common/defs.h>
#include <ydb-cpp-sdk/library/json/fast_sax/parser.h>

#include <src/util/stream/mem.h>
#include <ydb-cpp-sdk/util/stream/mem.h>

namespace NJson {
struct TJsonReaderConfig {
Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/library/json/writer/json.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <src/util/generic/yexception.h>
#include <src/util/string/cast.h>
#include <ydb-cpp-sdk/util/generic/yexception.h>
#include <ydb-cpp-sdk/util/string/cast.h>

#include <vector>

Expand Down
12 changes: 6 additions & 6 deletions include/ydb-cpp-sdk/library/json/writer/json_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

#include <ydb-cpp-sdk/library/json/common/defs.h>

#include <src/util/generic/hash.h>
#include <ydb-cpp-sdk/util/generic/utility.h>
#include <ydb-cpp-sdk/util/generic/yexception.h>

#include <src/util/generic/utility.h>
#include <src/util/generic/yexception.h>
#include <unordered_map>

namespace NJson {
enum EJsonValueType {
Expand Down Expand Up @@ -33,7 +33,7 @@ namespace NJson {
void Clear() noexcept;

public:
typedef THashMap<std::string, TJsonValue> TMapType;
typedef std::unordered_map<std::string, TJsonValue> TMapType;
typedef std::deque<TJsonValue> TArray;

TJsonValue() noexcept = default;
Expand Down Expand Up @@ -265,10 +265,10 @@ namespace NJson {
: TJsonValue(NJson::JSON_MAP)
{}

TJsonMap(const std::initializer_list<std::pair<std::string, TJsonValue>>& list)
TJsonMap(const std::initializer_list<std::pair<const std::string, TJsonValue>>& list)
: TJsonValue(NJson::JSON_MAP)
{
GetMapSafe() = THashMap<std::string, TJsonValue>(list);
GetMapSafe() = std::unordered_map<std::string, TJsonValue>(list);
}
};

Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/library/logger/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "priority.h"

#include <src/util/generic/noncopyable.h>
#include <ydb-cpp-sdk/util/generic/noncopyable.h>
#include <vector>
#include <cstddef>

Expand Down
4 changes: 2 additions & 2 deletions include/ydb-cpp-sdk/library/logger/element.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include "record.h"


#include <src/util/string/cast.h>
#include <src/util/stream/tempbuf.h>
#include <ydb-cpp-sdk/util/string/cast.h>
#include <ydb-cpp-sdk/util/stream/tempbuf.h>


class TLog;
Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/library/logger/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "record.h"
#include "thread.h"

#include <src/util/generic/ptr.h>
#include <ydb-cpp-sdk/util/generic/ptr.h>

#include <functional>
#include <cstdarg>
Expand Down
Loading

0 comments on commit f9e7321

Please sign in to comment.