Skip to content

Commit

Permalink
Add missing namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dyemanov committed Nov 9, 2023
1 parent a30cb95 commit ca6f632
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 35 deletions.
2 changes: 2 additions & 0 deletions src/common/classes/TriState.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#ifndef CLASSES_TRISTATE_H
#define CLASSES_TRISTATE_H

namespace Firebird {

class TriState
{
Expand Down Expand Up @@ -129,5 +130,6 @@ inline bool TriState::toggle()
return true;
}

} // namespace Firebird

#endif // CLASSES_TRISTATE_H
26 changes: 13 additions & 13 deletions src/dsql/DdlNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ class CreateAlterFunctionNode : public DdlNode
bool privateScope;
bool preserveDefaults;
SLONG udfReturnPos;
TriState ssDefiner;
Firebird::TriState ssDefiner;
};


Expand Down Expand Up @@ -616,7 +616,7 @@ class CreateAlterProcedureNode : public DdlNode
MetaName packageOwner;
bool privateScope;
bool preserveDefaults;
TriState ssDefiner;
Firebird::TriState ssDefiner;
};


Expand Down Expand Up @@ -700,7 +700,7 @@ class TriggerDefinition
MetaName name;
MetaName relationName;
std::optional<FB_UINT64> type;
TriState active;
Firebird::TriState active;
std::optional<int> position;
NestConst<ExternalClause> external;
Firebird::string source;
Expand Down Expand Up @@ -990,7 +990,7 @@ class AlterDomainNode : public DdlNode
NestConst<ValueSourceClause> setDefault;
MetaName renameTo;
Firebird::AutoPtr<dsql_fld> type;
TriState notNullFlag; // true = NOT NULL / false = NULL
Firebird::TriState notNullFlag; // true = NOT NULL / false = NULL
};


Expand Down Expand Up @@ -1214,7 +1214,7 @@ class RelationNode : public DdlNode
MetaName identitySequence;
std::optional<IdentityType> identityType;
std::optional<USHORT> collationId;
TriState notNullFlag; // true = NOT NULL / false = NULL
Firebird::TriState notNullFlag; // true = NOT NULL / false = NULL
std::optional<USHORT> position;
Firebird::string defaultSource;
Firebird::ByteChunk defaultValue;
Expand Down Expand Up @@ -1553,8 +1553,8 @@ class RelationNode : public DdlNode
NestConst<RelationSourceNode> dsqlNode;
MetaName name;
Firebird::Array<NestConst<Clause> > clauses;
TriState ssDefiner;
TriState replicationState;
Firebird::TriState ssDefiner;
Firebird::TriState replicationState;
};


Expand Down Expand Up @@ -1726,9 +1726,9 @@ class CreateIndexNode : public DdlNode

MetaName relation;
Firebird::ObjectsArray<MetaName> columns;
TriState unique;
TriState descending;
TriState inactive;
Firebird::TriState unique;
Firebird::TriState descending;
Firebird::TriState inactive;
SSHORT type;
bid expressionBlr;
bid expressionSource;
Expand Down Expand Up @@ -2219,8 +2219,8 @@ class CreateAlterUserNode : public UserNode
Firebird::string* lastName;
MetaName* plugin;
Firebird::string* comment;
TriState adminRole;
TriState active;
Firebird::TriState adminRole;
Firebird::TriState active;
Mode mode;

void addProperty(MetaName* pr, Firebird::string* val = NULL)
Expand Down Expand Up @@ -2461,7 +2461,7 @@ class AlterDatabaseNode : public DdlNode
Firebird::Array<NestConst<DbFileClause> > files;
MetaName cryptPlugin;
MetaName keyName;
TriState ssDefiner;
Firebird::TriState ssDefiner;
Firebird::Array<MetaName> pubTables;
};

Expand Down
2 changes: 1 addition & 1 deletion src/dsql/NodePrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class NodePrinter
print(s, *array);
}

void print(const Firebird::string& s, const TriState& triState)
void print(const Firebird::string& s, const Firebird::TriState& triState)
{
if (triState.isAssigned())
print(s, triState.asBool());
Expand Down
2 changes: 1 addition & 1 deletion src/dsql/PackageNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CreateAlterPackageNode : public DdlNode
Firebird::Array<Item>* items;
Firebird::SortedArray<MetaName> functionNames;
Firebird::SortedArray<MetaName> procedureNames;
TriState ssDefiner;
Firebird::TriState ssDefiner;

private:
MetaName owner;
Expand Down
6 changes: 3 additions & 3 deletions src/dsql/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ class Parser : public Firebird::PermanentStorage
}
}

void setClause(TriState& clause, const char* duplicateMsg, bool value)
void setClause(Firebird::TriState& clause, const char* duplicateMsg, bool value)
{
checkDuplicateClause(clause, duplicateMsg);
clause = value;
}

void setClause(TriState& clause, const char* duplicateMsg, const TriState& value)
void setClause(Firebird::TriState& clause, const char* duplicateMsg, const Firebird::TriState& value)
{
if (value.isAssigned())
{
Expand Down Expand Up @@ -322,7 +322,7 @@ class Parser : public Firebird::PermanentStorage
return clause.hasData();
}

bool isDuplicateClause(const TriState& clause)
bool isDuplicateClause(const Firebird::TriState& clause)
{
return clause.isAssigned();
}
Expand Down
16 changes: 8 additions & 8 deletions src/dsql/StmtNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ class SelectNode final : public TypedNode<DsqlOnlyStmtNode, StmtNode::TYPE_SELEC
public:
NestConst<SelectExprNode> selectExpr;
NestConst<RseNode> rse;
TriState optimizeForFirstRows;
Firebird::TriState optimizeForFirstRows;
bool forUpdate = false;
bool withLock = false;
bool skipLocked = false;
Expand Down Expand Up @@ -1626,12 +1626,12 @@ class SetTransactionNode : public TransactionNode
std::optional<CommitNumber> atSnapshotNumber;
std::optional<unsigned> isoLevel;
std::optional<USHORT> lockTimeout;
TriState readOnly;
TriState wait;
TriState noAutoUndo;
TriState ignoreLimbo;
TriState restartRequests;
TriState autoCommit;
Firebird::TriState readOnly;
Firebird::TriState wait;
Firebird::TriState noAutoUndo;
Firebird::TriState ignoreLimbo;
Firebird::TriState restartRequests;
Firebird::TriState autoCommit;
};


Expand Down Expand Up @@ -1901,7 +1901,7 @@ class SetOptimizeNode : public SessionManagementNode
virtual void execute(thread_db* tdbb, DsqlRequest* request, jrd_tra** traHandle) const;

public:
TriState optimizeMode;
Firebird::TriState optimizeMode;
};


Expand Down
2 changes: 1 addition & 1 deletion src/dsql/parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ using namespace Firebird;
{}

std::optional<int> nullableIntVal;
TriState triState;
Firebird::TriState triState;
std::optional<Jrd::TriggerDefinition::SqlSecurity> nullableSqlSecurityVal;
std::optional<Jrd::OverrideClause> nullableOverrideClause;
struct { bool first; bool second; } boolPair;
Expand Down
2 changes: 1 addition & 1 deletion src/jrd/Attachment.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ class Attachment : public pool_alloc<type_att>
USHORT att_original_timezone;
USHORT att_current_timezone;
int att_parallel_workers;
TriState att_opt_first_rows;
Firebird::TriState att_opt_first_rows;

PageToBufferMap* att_bdb_cache; // managed in CCH, created in att_pool, freed with it

Expand Down
2 changes: 1 addition & 1 deletion src/jrd/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ class Database : public pool_alloc<type_dbb>
time_t dbb_linger_end;
Firebird::RefPtr<Firebird::IPluginConfig> dbb_plugin_config;

TriState dbb_repl_state; // replication state
Firebird::TriState dbb_repl_state; // replication state
Lock* dbb_repl_lock; // replication state lock
Firebird::SyncObject dbb_repl_sync;
FB_UINT64 dbb_repl_sequence; // replication sequence
Expand Down
2 changes: 1 addition & 1 deletion src/jrd/RecordSourceNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ class RseNode final : public TypedNode<RecordSourceNode, RecordSourceNode::TYPE_
Firebird::Array<NestConst<RecordSourceNode> > rse_relations;
USHORT flags = 0;
USHORT rse_jointype = blr_inner; // inner, left, full
TriState firstRows; // optimize for first rows
Firebird::TriState firstRows; // optimize for first rows
};

class SelectExprNode final : public TypedNode<RecordSourceNode, RecordSourceNode::TYPE_SELECT_EXPR>
Expand Down
4 changes: 2 additions & 2 deletions src/jrd/Relation.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ class jrd_rel : public pool_alloc<type_rel>
TrigVector* rel_post_store; // Post-operation store trigger
prim rel_primary_dpnds; // foreign dependencies on this relation's primary key
frgn rel_foreign_refs; // foreign references to other relations' primary keys
TriState rel_ss_definer;

TriState rel_repl_state; // replication state
Firebird::TriState rel_ss_definer;
Firebird::TriState rel_repl_state; // replication state

Firebird::Mutex rel_drop_mutex;

Expand Down
2 changes: 1 addition & 1 deletion src/jrd/jrd.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Trigger
Firebird::string entryPoint; // External trigger entrypoint
Firebird::string extBody; // External trigger body
ExtEngineManager::Trigger* extTrigger; // External trigger
TriState ssDefiner;
Firebird::TriState ssDefiner;
MetaName owner; // Owner for SQL SECURITY

bool isActive() const;
Expand Down
2 changes: 1 addition & 1 deletion src/jrd/met_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ void MET_store_dependencies(Jrd::thread_db*, Firebird::Array<Jrd::CompilerScratc
const Jrd::jrd_rel*, const Jrd::MetaName&, int, Jrd::jrd_tra*);

int MET_get_linger(Jrd::thread_db*);
TriState MET_get_ss_definer(Jrd::thread_db*);
Firebird::TriState MET_get_ss_definer(Jrd::thread_db*);

#endif // JRD_MET_PROTO_H
1 change: 0 additions & 1 deletion src/jrd/val.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include "../include/fb_blk.h"
#include "../common/classes/array.h"
#include "../common/classes/TriState.h"
#include "../jrd/intl_classes.h"
#include "../jrd/MetaName.h"
#include "../jrd/QualifiedName.h"
Expand Down

0 comments on commit ca6f632

Please sign in to comment.