-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support to rename property/table
- Loading branch information
1 parent
299faf1
commit 1963dc5
Showing
34 changed files
with
4,320 additions
and
3,634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#pragma once | ||
|
||
#include "bound_ddl.h" | ||
|
||
namespace kuzu { | ||
namespace binder { | ||
|
||
class BoundRenameProperty : public BoundDDL { | ||
public: | ||
explicit BoundRenameProperty( | ||
table_id_t tableID, string tableName, property_id_t propertyID, string newName) | ||
: BoundDDL{StatementType::RENAME_PROPERTY, std::move(tableName)}, tableID{tableID}, | ||
propertyID{propertyID}, newName{std::move(newName)} {} | ||
|
||
inline table_id_t getTableID() const { return tableID; } | ||
|
||
inline property_id_t getPropertyID() const { return propertyID; } | ||
|
||
inline string getNewName() const { return newName; } | ||
|
||
private: | ||
table_id_t tableID; | ||
property_id_t propertyID; | ||
string newName; | ||
}; | ||
|
||
} // namespace binder | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include "bound_ddl.h" | ||
|
||
namespace kuzu { | ||
namespace binder { | ||
|
||
class BoundRenameTable : public BoundDDL { | ||
public: | ||
explicit BoundRenameTable(table_id_t tableID, string tableName, string newName) | ||
: BoundDDL{StatementType::RENAME_TABLE, std::move(tableName)}, tableID{tableID}, | ||
newName{std::move(newName)} {} | ||
|
||
inline table_id_t getTableID() const { return tableID; } | ||
|
||
inline string getNewName() const { return newName; } | ||
|
||
private: | ||
table_id_t tableID; | ||
string newName; | ||
}; | ||
|
||
} // namespace binder | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include "parser/ddl/ddl.h" | ||
|
||
namespace kuzu { | ||
namespace parser { | ||
|
||
using namespace std; | ||
|
||
class RenameProperty : public DDL { | ||
public: | ||
explicit RenameProperty(string tableName, string propertyName, string newName) | ||
: DDL{StatementType::RENAME_PROPERTY, std::move(tableName)}, | ||
propertyName{std::move(propertyName)}, newName{std::move(newName)} {} | ||
|
||
inline string getPropertyName() const { return propertyName; } | ||
|
||
inline string getNewName() const { return newName; } | ||
|
||
private: | ||
string propertyName; | ||
string newName; | ||
}; | ||
|
||
} // namespace parser | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include "parser/ddl/ddl.h" | ||
|
||
namespace kuzu { | ||
namespace parser { | ||
|
||
using namespace std; | ||
|
||
class RenameTable : public DDL { | ||
public: | ||
explicit RenameTable(string tableName, string newName) | ||
: DDL{StatementType::RENAME_TABLE, std::move(tableName)}, newName{std::move(newName)} {} | ||
|
||
inline string getNewName() const { return newName; } | ||
|
||
private: | ||
string newName; | ||
}; | ||
|
||
} // namespace parser | ||
} // namespace kuzu |
Oops, something went wrong.