schema node analyze progress
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
namespace matador::object {
|
||||
|
||||
struct primary_key_info {
|
||||
std::string column_name;
|
||||
std::string pk_column_name;
|
||||
utils::basic_type type;
|
||||
utils::identifier pk;
|
||||
};
|
||||
|
||||
@@ -36,25 +37,26 @@ public:
|
||||
|
||||
template < class Type >
|
||||
void on_primary_key(const char *id, Type &pk, std::enable_if_t<std::is_integral_v<Type> && !std::is_same_v<bool, Type>>* = nullptr) {
|
||||
primary_key_info_.column_name = id;
|
||||
primary_key_info_.pk_column_name = id;
|
||||
primary_key_info_.type = utils::data_type_traits<Type>::type();
|
||||
primary_key_info_.pk = pk;
|
||||
}
|
||||
|
||||
void on_primary_key(const char *id, const std::string &pk, size_t size);
|
||||
|
||||
void on_revision(const char * /*id*/, uint64_t &/*rev*/) {}
|
||||
static void on_revision(const char * /*id*/, uint64_t &/*rev*/) {}
|
||||
template<typename Type>
|
||||
void on_attribute(const char * /*id*/, Type &/*val*/, const utils::field_attributes &/*attr*/ = utils::null_attributes) {}
|
||||
static void on_attribute(const char * /*id*/, Type &/*val*/, const utils::field_attributes &/*attr*/ = utils::null_attributes) {}
|
||||
template<class Pointer>
|
||||
void on_belongs_to(const char * /*id*/, Pointer &/*val*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
static void on_belongs_to(const char * /*id*/, Pointer &/*val*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
template<class Pointer>
|
||||
void on_has_one(const char * /*id*/, Pointer &/*val*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
static void on_has_one(const char * /*id*/, Pointer &/*val*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
template<class ContainerType>
|
||||
void on_has_many(const char * /*id*/, ContainerType &/*col*/, const char *, const utils::foreign_attributes &/*attr*/) {}
|
||||
static void on_has_many(const char * /*id*/, ContainerType &/*col*/, const char *, const utils::foreign_attributes &/*attr*/) {}
|
||||
template<class ContainerType>
|
||||
void on_has_many_to_many(const char * /*id*/, ContainerType &/*col*/, const char * /*join_column*/, const char * /*inverse_join_column*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
static void on_has_many_to_many(const char * /*id*/, ContainerType &/*col*/, const char * /*join_column*/, const char * /*inverse_join_column*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
template<class ContainerType>
|
||||
void on_has_many_to_many(const char * /*id*/, ContainerType &/*col*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
static void on_has_many_to_many(const char * /*id*/, ContainerType &/*col*/, const utils::foreign_attributes &/*attr*/) {}
|
||||
|
||||
private:
|
||||
primary_key_info primary_key_info_{};
|
||||
|
||||
Reference in New Issue
Block a user