-
-
Notifications
You must be signed in to change notification settings - Fork 524
Expand file tree
/
Copy pathSqlliteJoinTests.cs
More file actions
35 lines (28 loc) · 1004 Bytes
/
SqlliteJoinTests.cs
File metadata and controls
35 lines (28 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using SqlKata.Compilers;
using SqlKata.Tests.Infrastructure;
using Xunit;
namespace SqlKata.Tests.Sqlite
{
public class SqlliteJoinTests : TestSupport
{
private readonly SqliteCompiler compiler;
public SqlliteJoinTests()
{
compiler = Compilers.Get<SqliteCompiler>(EngineCodes.Sqlite);
}
[Fact]
public void Join()
{
var query = new Query("Table").Join("TableA", "Column1", "ColumnA");
var ctx = new SqlResult { Query = query };
Assert.Equal("\nINNER JOIN \"TableA\" ON \"Column1\" = \"ColumnA\"", compiler.CompileJoins(ctx));
}
[Fact]
public void JoinWithIndexHint()
{
var query = new Query("Table").Join("TableA", "Column1", "ColumnA", indexHint: "index1");
var ctx = new SqlResult { Query = query };
Assert.Equal("\nINNER JOIN \"TableA\" ON \"Column1\" = \"ColumnA\"", compiler.CompileJoins(ctx));
}
}
}