Skip to content

Commit 843b8e9

Browse files
sarahmonodGus Monod
authored andcommitted
Add tables to create for execution of the tests
These are the tables that the tests expect to have in the database. Note that they should contain no data. Signed-off-by: Gus Monod <[email protected]>
1 parent 2ec3d4a commit 843b8e9

File tree

6 files changed

+72
-0
lines changed

6 files changed

+72
-0
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ jobs:
8282
fi;
8383
done
8484
'
85+
- name: Creating tables
86+
run: |
87+
tables="$(cat tests/schemas/$COMDB2_DBNAME/table_constraint_order.txt)"
88+
for table_name in $tables
89+
do
90+
table_file="tests/schemas/$COMDB2_DBNAME/$table_name.csc2"
91+
echo "Creating $table_name from $table_file"
92+
/opt/bb/bin/cdb2sql "$COMDB2_DBNAME" local "create table $table_name { $(cat $table_file) }"
93+
done
8594
- name: Set up Python ${{ matrix.python-version }}
8695
uses: actions/setup-python@v4 # note that this step overwrites the PKG_CONFIG_PATH variable
8796
with:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
tag ondisk
2+
{
3+
short short_col
4+
u_short u_short_col
5+
int int_col
6+
u_int u_int_col
7+
longlong longlong_col
8+
// u_longlong u_longlong_col
9+
float float_col
10+
double double_col
11+
byte byte_col
12+
byte byte_array_col[5]
13+
cstring cstring_col[6]
14+
pstring pstring_col[10]
15+
blob blob_col
16+
datetime datetime_col
17+
// datetimeus datetimeus_col
18+
// intervalym intervalym_col
19+
// intervalds intervalds_col
20+
// intervaldsus intervaldsus_col
21+
vutf8 vutf8_col
22+
// decimal32 decimal32_col
23+
// decimal64 decimal64_col
24+
// decimal128 decimal128_col
25+
}
26+
27+
keys
28+
{
29+
"KEY1" = short_col
30+
}

tests/schemas/mattdb/child.csc2

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
tag ondisk
2+
{
3+
int key
4+
}
5+
6+
keys
7+
{
8+
"KEY" = key
9+
}
10+
11+
constraints
12+
{
13+
"KEY" -> <"simple":"KEY1">
14+
}

tests/schemas/mattdb/simple.csc2

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tag ondisk
2+
{
3+
int key
4+
int val
5+
}
6+
7+
keys
8+
{
9+
"KEY1" = key
10+
}

tests/schemas/mattdb/strings.csc2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tag ondisk
2+
{
3+
cstring foo[6]
4+
byte bar[5]
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
all_datatypes
2+
simple
3+
strings
4+
child

0 commit comments

Comments
 (0)