-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More compile time checks for Relations.
- Loading branch information
Showing
11 changed files
with
358 additions
and
62 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
23 changes: 23 additions & 0 deletions
23
...rceGenerator.Test/RelationTests.VerifyThatInKeyValueCannotBeAlsoSecondaryKey.verified.txt
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,23 @@ | ||
{ | ||
Diagnostics: [ | ||
{ | ||
Location: /* | ||
|
||
public interface IPersonTable : IRelation<Person> | ||
^^^^^^^^^^^^ | ||
{ | ||
*/ | ||
: (13,17)-(13,29), | ||
Message: Cannot use InKeyValue cannot be part of any SecondaryKey in Name, | ||
Severity: Error, | ||
Descriptor: { | ||
Id: BTDB0004, | ||
Title: Cannot use InKeyValue cannot be part of any SecondaryKey in Name, | ||
MessageFormat: Cannot use InKeyValue cannot be part of any SecondaryKey in Name, | ||
Category: BTDB, | ||
DefaultSeverity: Error, | ||
IsEnabledByDefault: true | ||
} | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
...rceGenerator.Test/RelationTests.VerifyThatInKeyValueCannotBeBeforePrimaryKey.verified.txt
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,23 @@ | ||
{ | ||
Diagnostics: [ | ||
{ | ||
Location: /* | ||
} | ||
public interface IPersonTable : IRelation<Person> | ||
^^^^^^^^^^^^ | ||
{ | ||
*/ | ||
: (11,17)-(11,29), | ||
Message: InKeyValue InKeyValue must be in order after PrimaryKey PrimaryKey, | ||
Severity: Error, | ||
Descriptor: { | ||
Id: BTDB0006, | ||
Title: InKeyValue InKeyValue must be in order after PrimaryKey PrimaryKey, | ||
MessageFormat: InKeyValue InKeyValue must be in order after PrimaryKey PrimaryKey, | ||
Category: BTDB, | ||
DefaultSeverity: Error, | ||
IsEnabledByDefault: true | ||
} | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
BTDB.SourceGenerator.Test/RelationTests.VerifyThatSecondaryKeyCannotBeNamedId.verified.txt
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,23 @@ | ||
{ | ||
Diagnostics: [ | ||
{ | ||
Location: /* | ||
|
||
public interface IPersonTable : IRelation<Person> | ||
^^^^^^^^^^^^ | ||
{ | ||
*/ | ||
: (10,17)-(10,29), | ||
Message: Cannot use Id as name of secondary key in Name, | ||
Severity: Error, | ||
Descriptor: { | ||
Id: BTDB0003, | ||
Title: Cannot use Id as name of secondary key in Name, | ||
MessageFormat: Cannot use Id as name of secondary key in Name, | ||
Category: BTDB, | ||
DefaultSeverity: Error, | ||
IsEnabledByDefault: true | ||
} | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
...urceGenerator.Test/RelationTests.VerifyThatTwoPrimaryKeysCannotHaveSameOrder.verified.txt
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,23 @@ | ||
{ | ||
Diagnostics: [ | ||
{ | ||
Location: /* | ||
} | ||
public interface IPersonTable : IRelation<Person> | ||
^^^^^^^^^^^^ | ||
{ | ||
*/ | ||
: (11,17)-(11,29), | ||
Message: Cannot have multiple PrimaryKey with same order in P1Also as in P1, | ||
Severity: Error, | ||
Descriptor: { | ||
Id: BTDB0005, | ||
Title: Cannot have multiple PrimaryKey with same order in P1Also as in P1, | ||
MessageFormat: Cannot have multiple PrimaryKey with same order in P1Also as in P1, | ||
Category: BTDB, | ||
DefaultSeverity: Error, | ||
IsEnabledByDefault: true | ||
} | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
...ceGenerator.Test/RelationTests.VerifyThatTwoSecondaryKeysCannotHaveSameOrder.verified.txt
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,23 @@ | ||
{ | ||
Diagnostics: [ | ||
{ | ||
Location: /* | ||
} | ||
public interface IPersonTable : IRelation<Person> | ||
^^^^^^^^^^^^ | ||
{ | ||
*/ | ||
: (13,17)-(13,29), | ||
Message: Cannot have multiple SecondaryKey with same order in S1Also as in S1, | ||
Severity: Error, | ||
Descriptor: { | ||
Id: BTDB0007, | ||
Title: Cannot have multiple SecondaryKey with same order in S1Also as in S1, | ||
MessageFormat: Cannot have multiple SecondaryKey with same order in S1Also as in S1, | ||
Category: BTDB, | ||
DefaultSeverity: Error, | ||
IsEnabledByDefault: true | ||
} | ||
} | ||
] | ||
} |
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
Oops, something went wrong.