Skip to content

Commit

Permalink
grammar: Add support for multiple constraints on the same field(s)
Browse files Browse the repository at this point in the history
Example:
CREATE TABLE `y` (
	`a` int,
	`b` int,
	CONSTRAINT `c1` UNIQUE(`a`,`b`),
	CONSTRAINT `c2` UNIQUE(`a`,`b`)
);
  • Loading branch information
MKleusberg committed Aug 26, 2016
1 parent 5e6900e commit e1ff34e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sqlitetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <QVector>
#include <QStringList>
#include <QPair>
#include <QMap>
#include <QMultiMap>

namespace sqlb {

Expand All @@ -21,8 +21,8 @@ class UniqueConstraint;

typedef QSharedPointer<Field> FieldPtr;
typedef QVector< FieldPtr > FieldVector;
typedef QMap<FieldVector, ForeignKeyClause> ForeignKeyMap;
typedef QMap<FieldVector, UniqueConstraint> UniqueMap;
typedef QMultiMap<FieldVector, ForeignKeyClause> ForeignKeyMap;
typedef QMultiMap<FieldVector, UniqueConstraint> UniqueMap;

class Constraint
{
Expand Down

0 comments on commit e1ff34e

Please sign in to comment.