Skip to content

Commit 73118b8

Browse files
committed
Complete Oracle operation support. Collapse unneeded groups. Avoid unneeded sqlserver returns
1 parent 448476a commit 73118b8

346 files changed

Lines changed: 16440 additions & 6596 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-older.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ jobs:
3636
MYSQL_ROOT_PASSWORD: ddd53e85-b15e-4da8-91e5-a7d3b00a0ab2
3737

3838
oracle:
39-
image: gvenzl/oracle-xe:18
40-
ports:
39+
image: gvenzl/oracle-xe:21-slim-faststart
40+
ports:
4141
- 127.0.0.1:41521:1521
4242
- 127.0.0.1:45500:5500
43-
env:
44-
ORACLE_PASSWORD: ddd53e85-b15e-4da8
45-
ORACLE_ALLOW_REMOTE: true
43+
env:
44+
ORACLE_PASSWORD: ddd53e85-b15e-4da8
45+
ORACLE_ALLOW_REMOTE: true
46+
ORACLE_SGA_TARGET: 512
47+
ORACLE_PGA_AGGREGATE_TARGET: 256
48+
ORACLE_DISABLE_ASYNCH_IO: true
4649

4750
postgresql:
4851
image: postgres:14-alpine

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
env:
4444
ORACLE_PASSWORD: ddd53e85-b15e-4da8
4545
ORACLE_ALLOW_REMOTE: true
46+
ORACLE_DISABLE_APEX: true
47+
ORACLE_DISABLE_JSON: true
48+
ORACLE_SGA_TARGET: 512
49+
ORACLE_PGA_AGGREGATE_TARGET: 256
4650

4751
postgresql:
4852
image: pgvector/pgvector:pg18

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ This fork enhances the original RepoDb with:
3636

3737
Choose your database platform:
3838

39-
- **[SQL Server](docs/getstarted/sqlserver.md)**Full-featured support with Microsoft.Data.SqlClient
40-
- **[SQLite](docs/getstarted/sqlite.md)**Perfect for testing and embedded scenarios
41-
- **[MySQL](docs/getstarted/mysql.md)**Popular relational database support
42-
- **[Oracle](docs/getstarted/oracle.md)**Enterprise database support
43-
- **[PostgreSQL](docs/getstarted/postgresql.md)**Advanced open-source database
39+
- **[SQL Server](docs/getstarted/sqlserver.md)**Using Microsoft.Data.SqlClient or if really necessary System.Data.SqlClient
40+
- **[PostgreSQL](docs/getstarted/postgresql.md)**Uses the well-tested Npgsql
41+
- **[MySQL](docs/getstarted/mysql.md)**Supports for both MySql or MyslConnector
42+
- **[SQLite](docs/getstarted/sqlite.md)**Microsoft.Data.Sqlite and System.Data.SQLite
43+
- **[Oracle](docs/getstarted/oracle.md)**Now supported using Oracle.ManagedDataAccess.Core or Oracle.ManagedDataAccess for .Net Framework.
4444

4545
### Example Usage
4646

docker-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ services:
1515
- 127.0.0.1:45500:5500
1616
environment:
1717
ORACLE_PASSWORD: "ddd53e85-b15e-4da8"
18-
ORACLE_ALLOW_REMOTE: "true"
18+
ORACLE_ALLOW_REMOTE: true
19+
ORACLE_DISABLE_APEX: true
20+
ORACLE_DISABLE_JSON: true
21+
ORACLE_SGA_TARGET: 512
22+
ORACLE_PGA_AGGREGATE_TARGET: 256
1923
shm_size: '1gb'
2024
restart: no
2125

older/docker-compose.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ services:
99
restart: no
1010

1111
oracle:
12-
image: gvenzl/oracle-xe:18
12+
image: gvenzl/oracle-xe:21-slim-faststart
1313
ports:
1414
- 127.0.0.1:41521:1521
1515
- 127.0.0.1:45500:5500
1616
environment:
17-
ORACLE_PASSWORD: ddd53e85-b15e-4da8
18-
ORACLE_ALLOW_REMOTE: true
17+
ORACLE_PASSWORD: "ddd53e85-b15e-4da8"
18+
ORACLE_ALLOW_REMOTE: "true"
19+
ORACLE_SGA_TARGET: 512
20+
ORACLE_PGA_AGGREGATE_TARGET: 256
21+
ORACLE_DISABLE_ASYNCH_IO: "true"
1922
shm_size: '1gb'
2023
restart: no
2124

src/RepoDb.Core.DefinitionTests/Setup/SqlServerDbInstance.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Data.Common;
2+
using System.Diagnostics.CodeAnalysis;
23
using Microsoft.Data.SqlClient;
34
using RepoDb.TestCore;
45

@@ -13,6 +14,7 @@ static SqlServerDbInstance()
1314
TypeMapper.Add(typeof(DateTime), System.Data.DbType.DateTime2, true);
1415
}
1516

17+
[SetsRequiredMembers]
1618
public SqlServerDbInstance()
1719
{
1820
// System connection (sa on master)

src/RepoDb.Core.IntegrationTests/AnonymousTest.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ private static dynamic CreateIdentityTableTypeDef()
3535
public void TestExecuteQueryForAnonymous() =>
3636
TestExecuteQueryForAnonymousTrigger(CreateIdentityTableTypeDef());
3737

38-
private static void TestExecuteQueryForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
38+
private void TestExecuteQueryForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
3939
where TAnonymous : class
4040
{
4141
// Setup
4242
var tables = Helper.CreateIdentityTables(10);
4343

44-
using var connection = new SqlConnection(Database.ConnectionStringForRepoDb);
44+
using var connection = CreateConnection();
4545
// Act
46-
connection.InsertAll<IdentityTable>(tables);
46+
connection.InsertAll(tables);
4747

4848
// Act
4949
var result = connection.ExecuteQuery<TAnonymous>("SELECT * FROM [sc].[IdentityTable];");
@@ -60,15 +60,15 @@ private static void TestExecuteQueryForAnonymousTrigger<TAnonymous>(TAnonymous t
6060
public async Task TestExecuteQueryAsyncForAnonymous() =>
6161
await TestExecuteQueryAsyncForAnonymousTrigger(CreateIdentityTableTypeDef());
6262

63-
private static async Task TestExecuteQueryAsyncForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
63+
private async Task TestExecuteQueryAsyncForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
6464
where TAnonymous : class
6565
{
6666
// Setup
6767
var tables = Helper.CreateIdentityTables(10);
6868

69-
using var connection = new SqlConnection(Database.ConnectionStringForRepoDb);
69+
using var connection = CreateConnection();
7070
// Act
71-
connection.InsertAll<IdentityTable>(tables);
71+
connection.InsertAll(tables);
7272

7373
// Act
7474
var result = await connection.ExecuteQueryAsync<TAnonymous>("SELECT * FROM [sc].[IdentityTable];");
@@ -89,15 +89,15 @@ private static async Task TestExecuteQueryAsyncForAnonymousTrigger<TAnonymous>(T
8989
public void TestQueryForAnonymous() =>
9090
TestQueryForAnonymousTrigger(CreateIdentityTableTypeDef());
9191

92-
private static void TestQueryForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
92+
private void TestQueryForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
9393
where TAnonymous : class
9494
{
9595
// Setup
9696
var tables = Helper.CreateIdentityTables(10);
9797

98-
using var connection = new SqlConnection(Database.ConnectionStringForRepoDb);
98+
using var connection = CreateConnection();
9999
// Act
100-
connection.InsertAll<IdentityTable>(tables);
100+
connection.InsertAll(tables);
101101

102102
// Act
103103
var result = connection.Query<TAnonymous>("[sc].[IdentityTable]",
@@ -115,15 +115,15 @@ private static void TestQueryForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
115115
public async Task TestQueryAsyncForAnonymous() =>
116116
await TestQueryAsyncForAnonymousTrigger(CreateIdentityTableTypeDef());
117117

118-
private static async Task TestQueryAsyncForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
118+
private async Task TestQueryAsyncForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
119119
where TAnonymous : class
120120
{
121121
// Setup
122122
var tables = Helper.CreateIdentityTables(10);
123123

124-
using var connection = new SqlConnection(Database.ConnectionStringForRepoDb);
124+
using var connection = CreateConnection();
125125
// Act
126-
connection.InsertAll<IdentityTable>(tables);
126+
connection.InsertAll(tables);
127127

128128
// Act
129129
var result = await connection.QueryAsync<TAnonymous>("[sc].[IdentityTable]",
@@ -145,15 +145,15 @@ private static async Task TestQueryAsyncForAnonymousTrigger<TAnonymous>(TAnonymo
145145
public void TestQueryAllForAnonymous() =>
146146
TestQueryAllForAnonymousTrigger(CreateIdentityTableTypeDef());
147147

148-
private static void TestQueryAllForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
148+
private void TestQueryAllForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
149149
where TAnonymous : class
150150
{
151151
// Setup
152152
var tables = Helper.CreateIdentityTables(10);
153153

154-
using var connection = new SqlConnection(Database.ConnectionStringForRepoDb);
154+
using var connection = CreateConnection();
155155
// Act
156-
connection.InsertAll<IdentityTable>(tables);
156+
connection.InsertAll(tables);
157157

158158
// Act
159159
var result = connection.QueryAll<TAnonymous>("[sc].[IdentityTable]");
@@ -170,15 +170,15 @@ private static void TestQueryAllForAnonymousTrigger<TAnonymous>(TAnonymous typeD
170170
public async Task TestQueryAllAsyncForAnonymous() =>
171171
await TestQueryAllAsyncForAnonymousTrigger(CreateIdentityTableTypeDef());
172172

173-
private static async Task TestQueryAllAsyncForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
173+
private async Task TestQueryAllAsyncForAnonymousTrigger<TAnonymous>(TAnonymous typeDef)
174174
where TAnonymous : class
175175
{
176176
// Setup
177177
var tables = Helper.CreateIdentityTables(10);
178178

179-
using var connection = new SqlConnection(Database.ConnectionStringForRepoDb);
179+
using var connection = CreateConnection();
180180
// Act
181-
connection.InsertAll<IdentityTable>(tables);
181+
connection.InsertAll(tables);
182182

183183
// Act
184184
var result = await connection.QueryAllAsync<TAnonymous>("[sc].[IdentityTable]");

0 commit comments

Comments
 (0)