-
-
Notifications
You must be signed in to change notification settings - Fork 524
Expand file tree
/
Copy pathFirebirdJoinTests.cs
More file actions
35 lines (28 loc) · 1014 Bytes
/
FirebirdJoinTests.cs
File metadata and controls
35 lines (28 loc) · 1014 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.Firebird
{
public class FirebirdJoinTests : TestSupport
{
private readonly FirebirdCompiler compiler;
public FirebirdJoinTests()
{
compiler = Compilers.Get<FirebirdCompiler>(EngineCodes.Firebird);
}
[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));
}
}
}