Skip to content

Commit

Permalink
refactor: remove dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
SandPod committed Jan 12, 2024
1 parent f98f63b commit 07d9ca2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
5 changes: 0 additions & 5 deletions packages/serverpod/lib/src/database/table_relation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ class TableRelation {
return _tableRelationEntries.last.foreignField.queryAlias;
}

/// The foreign field to be joined including all joins as query alias.
String get foreignFieldQueryAliasWithJoins {
return '"${_buildRelationQueryAlias()}"."${_tableRelationEntries.last.foreignField.queryAlias}"';
}

/// Create a new [TableRelation] with only one entry for the last table
/// relation.
TableRelation get lastRelation {
Expand Down
14 changes: 0 additions & 14 deletions packages/serverpod/test/database/table_relation_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,6 @@ void main() {
);
});

test(
'when getting last joining foreign field query alias then correct alias is returned.',
() {
expect(tableRelation.foreignFieldQueryAliasWithJoins,
'"company_ceo_citizen"."citizen.id"');
});

group('when using copyAndAppend to create new table relation ', () {
var table = Table(tableName: 'citizen');
var foreignTable = Table(tableName: 'restaurant');
Expand Down Expand Up @@ -247,13 +240,6 @@ void main() {
);
});

test(
'when getting last joining foreign field query alias then correct alias is returned.',
() {
expect(tableRelation.foreignFieldQueryAliasWithJoins,
'"company_ceo_citizen_favoriteRestaurant_restaurant"."restaurant.id"');
});

test(
'that we fetch last relation from when getting last joining foreign field then field field only contain last table join.',
() {
Expand Down

0 comments on commit 07d9ca2

Please sign in to comment.