Sqlite: Add primary key table constraint to table builder

Change-Id: I60c158eb76db2217a2d045053bb8e47eef75ff7a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2020-06-02 22:16:06 +02:00
committed by Tim Jenssen
parent a61eff0079
commit cf441e8198
8 changed files with 139 additions and 7 deletions

View File

@@ -42,7 +42,10 @@ enum class AutoIncrement { No, Yes };
class PrimaryKey
{
friend bool operator==(PrimaryKey, PrimaryKey) { return true; }
friend bool operator==(PrimaryKey first, PrimaryKey second)
{
return first.autoincrement == second.autoincrement;
}
public:
AutoIncrement autoincrement = AutoIncrement::No;