Skip to content

Commit f97df1e

Browse files
Merge pull request #6 from abhinavminhas/dev
QueryDB Solution Updates
2 parents 47c3cc1 + d5a0ab3 commit f97df1e

File tree

23 files changed

+1781
-99
lines changed

23 files changed

+1781
-99
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: Test
6262
if: ${{ (matrix.os == 'ubuntu-22.04') && (matrix.dotnet-version == '3.1.x') }}
63-
run: dotnet test --no-build --verbosity normal --configuration Release --filter TestCategory=DB-TESTS
63+
run: dotnet test --no-build --logger "console;verbosity=detailed" --verbosity normal --configuration Release --filter TestCategory=DB-TESTS
6464

6565
- name: Docker Compose (Tear Down - DB Containers)
6666
if: ${{ (matrix.os == 'ubuntu-22.04') && (matrix.dotnet-version == '3.1.x') && always() }}
@@ -111,7 +111,7 @@ jobs:
111111
dbPassword: ${{ secrets.DB_PASSWORD }}
112112

113113
- name: Test
114-
run: dotnet test --no-build --verbosity normal --configuration Release --filter TestCategory=DB-TESTS /p:CollectCoverage=true /p:CoverletOutputFormat=lcov
114+
run: dotnet test --no-build --logger "console;verbosity=detailed" --verbosity normal --configuration Release --filter TestCategory=DB-TESTS /p:CollectCoverage=true /p:CoverletOutputFormat=lcov
115115

116116
- name: Docker Compose (Tear Down - DB Containers)
117117
if: always()

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
dbPassword: ${{ secrets.DB_PASSWORD }}
4848

4949
- name: Test
50-
run: dotnet test --no-build --verbosity normal --configuration Release --filter TestCategory=DB-TESTS /p:CollectCoverage=true /p:CoverletOutputFormat=lcov
50+
run: dotnet test --no-build --logger "console;verbosity=detailed" --verbosity normal --configuration Release --filter TestCategory=DB-TESTS /p:CollectCoverage=true /p:CoverletOutputFormat=lcov
5151

5252
- name: Docker Compose (Tear Down - DB Containers)
5353
uses: ./.github/workflows/docker-compose-teardown-dbs
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Docker Compose (Pull)
2+
3+
inputs:
4+
useCache:
5+
description: 'Enable docker compose caching.'
6+
required: true
7+
8+
runs:
9+
using: 'composite'
10+
11+
steps:
12+
- name: Install Docker Compose
13+
if: ${{ (inputs.useCache == 'true') }}
14+
shell: bash
15+
run: sudo apt-get install docker-compose
16+
17+
- name: Clean Up Docker System
18+
if: ${{ (inputs.useCache == 'true') }}
19+
shell: bash
20+
run: |
21+
docker system prune -a --force
22+
23+
- name: Set Up Docker Cache
24+
if: ${{ (inputs.useCache == 'true') }}
25+
uses: actions/cache@v4
26+
with:
27+
path: /tmp/.docker-cache
28+
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }}
29+
restore-keys: |
30+
${{ runner.os }}-docker-
31+
32+
- name: Load Docker Cache
33+
if: ${{ (inputs.useCache == 'true') }}
34+
shell: bash
35+
run: |
36+
mkdir -p /tmp/.docker-cache
37+
if [ -f /tmp/.docker-cache/image.tar ]; then docker load -i /tmp/.docker-cache/image.tar; fi
38+
39+
- name: Docker Compose (Pull)
40+
shell: bash
41+
run: docker compose -f docker-compose.yml pull --parallel
42+
43+
- name: Docker Compose Save Images
44+
if: ${{ (inputs.useCache == 'true') }}
45+
shell: bash
46+
run: docker save -o /tmp/.docker-cache/image.tar $(docker-compose config | awk '/image:/ {print $2}')
47+

.github/workflows/docker-compose-start-dbs/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ runs:
1616
replacements: '__DB_PASSWORD__=${{ inputs.dbPassword }},__DB_PASSWORD__=${{ inputs.dbPassword }},__DB_PASSWORD__=${{ inputs.dbPassword }},__DB_PASSWORD__=${{ inputs.dbPassword }}'
1717

1818
- name: Docker Compose (Pull)
19-
shell: bash
20-
run: docker compose -f docker-compose.yml pull --parallel
19+
uses: ./.github/workflows/docker-compose-pull
20+
with:
21+
useCache: false
2122

2223
- name: Docker Compose (Start - DB Containers)
2324
shell: bash

QueryDB.Core.Tests/Entities.cs

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
using System;
2+
3+
namespace QueryDB.Core.Tests
4+
{
5+
public class Entities
6+
{
7+
public class MSSQL
8+
{
9+
public class Agents
10+
{
11+
public string Agent_Code { get; set; }
12+
public string Agent_Name { get; set; }
13+
public string Working_Area { get; set; }
14+
public decimal Commission { get; set; }
15+
public string Phone_No { get; set; }
16+
public string Country { get; set; }
17+
}
18+
public class Orders
19+
{
20+
public string Agent_Code { get; set; }
21+
public string Agent { get; set; }
22+
public string Agent_Name { get; set; }
23+
public string Agent_Location { get; set; }
24+
public string Cust_Code { get; set; }
25+
public string Customer { get; set; }
26+
public string Cust_Name { get; set; }
27+
public string Customer_Location { get; set; }
28+
public decimal Ord_Num { get; set; }
29+
public decimal Ord_Amount { get; set; }
30+
public decimal Advance_Amount { get; set; }
31+
public string Ord_Description { get; set; }
32+
}
33+
public class DataTypes
34+
{
35+
public long BigInt_Column { get; set; }
36+
public byte[] Binary_Column { get; set; }
37+
public bool Bit_Column { get; set; }
38+
public string Char_Column { get; set; }
39+
public DateTime Date_Column { get; set; }
40+
public DateTime DateTime_Column { get; set; }
41+
public DateTime DateTime2_Column { get; set; }
42+
public DateTimeOffset DateTimeOffset_Column { get; set; }
43+
public decimal Decimal_Column { get; set; }
44+
public double Float_Column { get; set; }
45+
public byte[] Image_Column { get; set; }
46+
public int Int_Column { get; set; }
47+
public decimal Money_Column { get; set; }
48+
public string NChar_Column { get; set; }
49+
public string NText_Column { get; set; }
50+
public decimal Numeric_Column { get; set; }
51+
public string NVarChar_Column { get; set; }
52+
public float Real_Column { get; set; }
53+
public DateTime SmallDateTime_Column { get; set; }
54+
public short SmallInt_Column { get; set; }
55+
public decimal SmallMoney_Column { get; set; }
56+
public object SqlVariant_Column { get; set; }
57+
public string Text_Column { get; set; }
58+
public TimeSpan Time_Column { get; set; }
59+
public byte[] Timestamp_Column { get; set; }
60+
public byte TinyInt_Column { get; set; }
61+
public Guid UniqueIdentifier_Column { get; set; }
62+
public byte[] VarBinary_Column { get; set; }
63+
public string VarChar_Column { get; set; }
64+
public string Xml_Column { get; set; }
65+
}
66+
public class Details
67+
{
68+
public string Agent_Code { get; set; }
69+
public string Agent { get; set; }
70+
public string Cust_Code { get; set; }
71+
public string Customer { get; set; }
72+
public decimal Ord_Num { get; set; }
73+
public decimal Ord_Amount { get; set; }
74+
}
75+
}
76+
public class MySQL
77+
{
78+
public class Agents
79+
{
80+
public string Agent_Code { get; set; }
81+
public string Agent_Name { get; set; }
82+
public string Working_Area { get; set; }
83+
public decimal Commission { get; set; }
84+
public string Phone_No { get; set; }
85+
public string Country { get; set; }
86+
}
87+
public class Orders
88+
{
89+
public string Agent_Code { get; set; }
90+
public string Agent { get; set; }
91+
public string Agent_Name { get; set; }
92+
public string Agent_Location { get; set; }
93+
public string Cust_Code { get; set; }
94+
public string Customer { get; set; }
95+
public string Cust_Name { get; set; }
96+
public string Customer_Location { get; set; }
97+
public decimal Ord_Num { get; set; }
98+
public decimal Ord_Amount { get; set; }
99+
public decimal Advance_Amount { get; set; }
100+
public string Ord_Description { get; set; }
101+
}
102+
public class DataTypes
103+
{
104+
public long BigInt_Column { get; set; }
105+
public ulong Bit_Column { get; set; }
106+
public string Char_Column { get; set; }
107+
public DateTime Date_Column { get; set; }
108+
public DateTime DateTime_Column { get; set; }
109+
public decimal Decimal_Column { get; set; }
110+
public float Float_Column { get; set; }
111+
public int Int_Column { get; set; }
112+
public string LongText_Column { get; set; }
113+
public int MediumInt_Column { get; set; }
114+
public string MediumText_Column { get; set; }
115+
public short SmallInt_Column { get; set; }
116+
public string Text_Column { get; set; }
117+
public TimeSpan Time_Column { get; set; }
118+
public DateTime Timestamp_Column { get; set; }
119+
public sbyte TinyInt_Column { get; set; }
120+
public string TinyText_Column { get; set; }
121+
public byte[] VarBinary_Column { get; set; }
122+
public string VarChar_Column { get; set; }
123+
}
124+
public class Details
125+
{
126+
public string Agent_Code { get; set; }
127+
public string Agent { get; set; }
128+
public string Cust_Code { get; set; }
129+
public string Customer { get; set; }
130+
public decimal Ord_Num { get; set; }
131+
public decimal Ord_Amount { get; set; }
132+
}
133+
}
134+
public class Oracle
135+
{
136+
public class Agents
137+
{
138+
public string Agent_Code { get; set; }
139+
public string Agent_Name { get; set; }
140+
public string Working_Area { get; set; }
141+
public double Commission { get; set; }
142+
public string Phone_No { get; set; }
143+
public string Country { get; set; }
144+
}
145+
public class Orders
146+
{
147+
public string Agent_Code { get; set; }
148+
public string Agent { get; set; }
149+
public string Agent_Name { get; set; }
150+
public string Agent_Location { get; set; }
151+
public string Cust_Code { get; set; }
152+
public string Customer { get; set; }
153+
public string Cust_Name { get; set; }
154+
public string Customer_Location { get; set; }
155+
public int Ord_Num { get; set; }
156+
public double Ord_Amount { get; set; }
157+
public double Advance_Amount { get; set; }
158+
public string Ord_Description { get; set; }
159+
}
160+
public class DataTypes
161+
{
162+
public byte[] BFile_Column { get; set; }
163+
public byte[] Blob_Column { get; set; }
164+
public string Char_Column { get; set; }
165+
public string Clob_Column { get; set; }
166+
public DateTime Date_Column { get; set; }
167+
public decimal Float_Column { get; set; }
168+
public decimal Integer_Column { get; set; }
169+
public long IntervalYearToMonth_Column { get; set; }
170+
public TimeSpan InternalDayToSecond_Column { get; set; }
171+
public string Long_Column { get; set; }
172+
public string NChar_Column { get; set; }
173+
public string NClob_Column { get; set; }
174+
public decimal Number_Column { get; set; }
175+
public string NVarchar2_Column { get; set; }
176+
public byte[] Raw_Column { get; set; }
177+
public DateTime Timestamp_Column { get; set; }
178+
public DateTime TimestampWithLocalTimeZone_Column { get; set; }
179+
public DateTime TimestampWithTimeZone_Column { get; set; }
180+
public string Varchar_Column { get; set; }
181+
public string Varchar2_Column { get; set; }
182+
}
183+
public class Details
184+
{
185+
public string Agent_Code { get; set; }
186+
public string Agent { get; set; }
187+
public string Cust_Code { get; set; }
188+
public string Customer { get; set; }
189+
public int Ord_Num { get; set; }
190+
public double Ord_Amount { get; set; }
191+
}
192+
}
193+
public class PostgreSQL
194+
{
195+
public class Agents
196+
{
197+
public string Agent_Code { get; set; }
198+
public string Agent_Name { get; set; }
199+
public string Working_Area { get; set; }
200+
public decimal Commission { get; set; }
201+
public string Phone_No { get; set; }
202+
public string Country { get; set; }
203+
}
204+
public class Orders
205+
{
206+
public string Agent_Code { get; set; }
207+
public string Agent { get; set; }
208+
public string Agent_Name { get; set; }
209+
public string Agent_Location { get; set; }
210+
public string Cust_Code { get; set; }
211+
public string Customer { get; set; }
212+
public string Cust_Name { get; set; }
213+
public string Customer_Location { get; set; }
214+
public decimal Ord_Num { get; set; }
215+
public decimal Ord_Amount { get; set; }
216+
public decimal Advance_Amount { get; set; }
217+
public string Ord_Description { get; set; }
218+
}
219+
public class DataTypes
220+
{
221+
public long BigInt_Column { get; set; }
222+
public bool Boolean_Column { get; set; }
223+
public byte[] Bytea_Column { get; set; }
224+
public string Char_Column { get; set; }
225+
public string Varchar_Column { get; set; }
226+
public DateTime Date_Column { get; set; }
227+
public double Double_Column { get; set; }
228+
public int Int_Column { get; set; }
229+
public decimal Money_Column { get; set; }
230+
public decimal Numeric_Column { get; set; }
231+
public float Real_Column { get; set; }
232+
public short SmallInt_Column { get; set; }
233+
public string Text_Column { get; set; }
234+
public TimeSpan Time_Column { get; set; }
235+
public DateTime Timestamp_Column { get; set; }
236+
public Guid Uuid_Column { get; set; }
237+
}
238+
public class Details
239+
{
240+
public string Agent_Code { get; set; }
241+
public string Agent { get; set; }
242+
public string Cust_Code { get; set; }
243+
public string Customer { get; set; }
244+
public decimal Ord_Num { get; set; }
245+
public decimal Ord_Amount { get; set; }
246+
}
247+
}
248+
}
249+
}

0 commit comments

Comments
 (0)