Server icon indicating copy to clipboard operation
Server copied to clipboard

Repository generator error - skill_caps.

Open KimLS opened this issue 1 year ago • 2 comments

The repository generator script does not generate a good repository for skill_caps table.

The table below:

CREATE TABLE skill_caps ( skillID TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', class TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', level TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', cap MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', class_ TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (skillID, class, level, class_) USING BTREE );

Generates the following struct: struct SkillCaps { uint8_t skillID; uint8_t class_; uint8_t level; uint32_t cap; uint8_t class_; };

It appears to not handle the class and class_ fields overlapping with the reserved word correctly.

KimLS avatar Jan 23 '24 21:01 KimLS

I guess something else notable is that it doesn't handle the primary key properly either but thinking on it I'm not sure you can expect a primary key that spans multiple fields to work very well with this sort of thing.

KimLS avatar Jan 23 '24 21:01 KimLS

Let’s chat about this one

Akkadius avatar Jan 23 '24 21:01 Akkadius