-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: unify many_one and many_many storage (#2912)
remove many_one multiplicity in storage
- Loading branch information
Showing
67 changed files
with
1,407 additions
and
1,955 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "common/enums/rel_multiplicity.h" | ||
|
||
#include "common/exception/binder.h" | ||
#include "common/string_format.h" | ||
|
||
namespace kuzu { | ||
namespace common { | ||
|
||
RelMultiplicity RelMultiplicityUtils::getFwd(const std::string& multiplicityStr) { | ||
if ("ONE_ONE" == multiplicityStr || "ONE_MANY" == multiplicityStr) { | ||
return RelMultiplicity::ONE; | ||
} else if ("MANY_ONE" == multiplicityStr || "MANY_MANY" == multiplicityStr) { | ||
return RelMultiplicity::MANY; | ||
} | ||
throw BinderException( | ||
stringFormat("Cannot bind {} as relationship multiplicity.", multiplicityStr)); | ||
} | ||
|
||
RelMultiplicity RelMultiplicityUtils::getBwd(const std::string& multiplicityStr) { | ||
if ("ONE_ONE" == multiplicityStr || "MANY_ONE" == multiplicityStr) { | ||
return RelMultiplicity::ONE; | ||
} else if ("ONE_MANY" == multiplicityStr || "MANY_MANY" == multiplicityStr) { | ||
return RelMultiplicity::MANY; | ||
} | ||
throw BinderException( | ||
stringFormat("Cannot bind {} as relationship multiplicity.", multiplicityStr)); | ||
} | ||
|
||
} // namespace common | ||
} // 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
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,16 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <string> | ||
|
||
namespace kuzu { | ||
namespace common { | ||
|
||
enum class RelMultiplicity : uint8_t { MANY, ONE }; | ||
struct RelMultiplicityUtils { | ||
static RelMultiplicity getFwd(const std::string& multiplicityStr); | ||
static RelMultiplicity getBwd(const std::string& multiplicityStr); | ||
}; | ||
|
||
} // namespace common | ||
} // 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
27 changes: 0 additions & 27 deletions
27
src/include/processor/operator/scan/scan_rel_csr_columns.h
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.