forked from electrum/ssb-dbgen
-
Notifications
You must be signed in to change notification settings - Fork 10
/
load_stub.c
281 lines (208 loc) · 4.03 KB
/
load_stub.c
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
/*****************************************************************
* Title: load_stub.c
* Sccsid: @(#)load_stub.c 2.1.8.1
* Description:
* stub routines for:
* inline load of dss benchmark
* header creation for dss benchmark
*
*****************************************************************
*/
#include <stdio.h>
#include "config.h"
#include "dss.h"
#include "dsstypes.h"
int
close_direct(void)
{
/* any post load cleanup goes here */
return(0);
}
int
prep_direct(void)
{
/* any preload prep goes here */
return(0);
}
int
hd_cust (FILE *f)
{
static int count = 0;
if (! count++)
printf("No header has been defined for the customer table\n");
return(0);
}
int
ld_cust (customer_t *cp, int mode)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No load routine has been defined",
"for the customer table");
return(0);
}
int
hd_part (FILE *f)
{
static int count = 0;
if (! count++)
printf("No header has been defined for the part table\n");
return(0);
}
int
ld_part (part_t *pp, int mode)
{
static int count = 0;
if (! count++)
printf("No load routine has been defined for the part table\n");
return(0);
}
int
ld_psupp (part_t *pp, int mode)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No load routine has been defined for the",
"psupp table\n");
return(0);
}
int
hd_supp (FILE *f)
{
static int count = 0;
if (! count++)
printf("No header has been defined for the supplier table\n");
return(0);
}
int
ld_supp (supplier_t *sp, int mode)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No load routine has been defined",
"for the supplier table\n");
return(0);
}
int
hd_order (FILE *f)
{
static int count = 0;
if (! count++)
printf("No header has been defined for the order table\n");
return(0);
}
int
ld_order (order_t *p, int mode)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No load routine has been defined",
"for the order table");
return(0);
}
ld_line (order_t *p, int mode)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No load routine has been defined",
"for the line table");
return(0);
}
int
hd_psupp (FILE *f)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No header has been defined for the",
"part supplier table");
return(0);
}
int
hd_line (FILE *f)
{
static int count = 0;
if (! count++)
printf("No header has been defined for the lineitem table\n");
return(0);
}
int
hd_nation (FILE *f)
{
static int count = 0;
if (! count++)
printf("No header has been defined for the nation table\n");
return(0);
}
#ifdef SSBM
#else
int
ld_nation (code_t *cp, int mode)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No load routine has been defined",
"for the nation table");
return(0);
}
int
hd_region (FILE *f)
{
static int count = 0;
if (! count++)
printf("No header has been defined for the region table\n");
return(0);
}
int
ld_region (code_t *cp, int mode)
{
static int count = 0;
if (! count++)
printf("%s %s\n",
"No load routine has been defined",
"for the region table");
return(0);
}
int
ld_order_line (order_t *p, int mode)
{
ld_order(p, mode);
ld_line (p, mode);
return(0);
}
int
hd_order_line (FILE *f)
{
hd_order(f);
hd_line (f);
return(0);
}
int
ld_part_psupp (part_t *p, int mode)
{
ld_part(p, mode);
ld_psupp (p, mode);
return(0);
}
int
hd_part_psupp (FILE *f)
{
hd_part(f);
hd_psupp(f);
return(0);
}
#endif
#ifdef SSBM
int
ld_date (date_t *d, int mode)
{
/*do nothing for now*/
return(0);
}
#endif