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