Skip to content

Commit 2b42ad9

Browse files
committed
Remove unsupported joins code
It's redundant.
1 parent 2af0891 commit 2b42ad9

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

SQLiteSharp/TableQuery.cs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,12 @@ public class TableQuery<T> : TableQuery, IEnumerable<T> {
1717
private int? _limit;
1818
private int? _offset;
1919

20-
private TableQuery? _joinInner;
21-
private Expression? _joinInnerKeySelector;
22-
private TableQuery? _joinOuter;
23-
private Expression? _joinOuterKeySelector;
24-
private Expression? _joinSelector;
25-
26-
private Expression? _selector;
27-
2820
private TableQuery(SQLiteConnection connection, TableMapping table) {
2921
Connection = connection;
3022
Table = table;
3123
}
32-
public TableQuery(SQLiteConnection connection) {
33-
Connection = connection;
34-
Table = Connection.GetMapping<T>();
24+
public TableQuery(SQLiteConnection connection)
25+
: this(connection, connection.GetMapping<T>()) {
3526
}
3627

3728
public TableQuery<U> Clone<U>() {
@@ -40,12 +31,6 @@ public TableQuery<U> Clone<U>() {
4031
_orderBys = _orderBys?.ToList(),
4132
_limit = _limit,
4233
_offset = _offset,
43-
_joinInner = _joinInner,
44-
_joinInnerKeySelector = _joinInnerKeySelector,
45-
_joinOuter = _joinOuter,
46-
_joinOuterKeySelector = _joinOuterKeySelector,
47-
_joinSelector = _joinSelector,
48-
_selector = _selector,
4934
};
5035
return query;
5136
}
@@ -138,10 +123,6 @@ private TableQuery<T> AddOrderBy<U>(Expression<Func<T, U>> orderExpression, bool
138123
}
139124

140125
private SQLiteCommand GenerateCommand(string selectionList) {
141-
if (_joinInner is not null && _joinOuter is not null) {
142-
throw new NotSupportedException("Joins are not supported.");
143-
}
144-
145126
string commandText = $"select {selectionList} from {Quote(Table.TableName)}";
146127
List<object?> parameters = [];
147128
if (_where is not null) {

0 commit comments

Comments
 (0)