// srpstructs.tbl -- Scheme structures for srpersist

static int structNameCount;

char *numericFields[] = {
  "precision",
  "scale",
  "sign",
  "val"
};

char *dateFields[] = {
  "year",
  "month",
  "day"
};

char *timeFields[] = {
  "hour",
  "minute",
  "second"
};

char *timeStampFields[] = {
  "year",
  "month",
  "day",
  "hour",
  "minute",
  "second",
  "fraction"
};

char *guidFields[] = {
  "data1",
  "data2",
  "data3",
  "data4",
};

char *yearIntervalFields[] = {
  "sign",
  "year"
};

char *monthIntervalFields[] = {
  "sign",
  "month"
};

char *dayIntervalFields[] = {
  "sign",
  "day"
};

char *hourIntervalFields[] = {
  "sign",
  "hour"
};

char *minuteIntervalFields[] = {
  "sign",
  "minute"
};

char *secondIntervalFields[] = {
  "sign",
  "second"
};

char *yearToMonthIntervalFields[] = {
  "sign",
  "year",
  "month"
};

char *dayToHourIntervalFields[] = {
  "sign",
  "day",
  "hour"
};

char *dayToMinuteIntervalFields[] = {
  "sign",
  "day",
  "hour",
  "minute",
};

char *dayToSecondIntervalFields[] = {
  "sign",
  "day",
  "hour",
  "minute",
  "second"
};

char *hourToMinuteIntervalFields[] = {
  "sign",
  "hour",
  "minute"
};

char *hourToSecondIntervalFields[] = {
  "sign",
  "hour",
  "minute",
  "second"
};

char *minuteToSecondIntervalFields[] = {
  "sign",
  "minute",
  "second"
};

Scheme_Object **numericStructFuns;
Scheme_Object **dateStructFuns;
Scheme_Object **timeStructFuns;
Scheme_Object **timeStampStructFuns;
Scheme_Object **guidStructFuns;
Scheme_Object **yearIntervalStructFuns;
Scheme_Object **monthIntervalStructFuns;
Scheme_Object **dayIntervalStructFuns;
Scheme_Object **hourIntervalStructFuns;
Scheme_Object **minuteIntervalStructFuns;
Scheme_Object **secondIntervalStructFuns;
Scheme_Object **yearToMonthIntervalStructFuns;
Scheme_Object **dayToHourIntervalStructFuns;
Scheme_Object **dayToMinuteIntervalStructFuns;
Scheme_Object **dayToSecondIntervalStructFuns;
Scheme_Object **hourToMinuteIntervalStructFuns;
Scheme_Object **hourToSecondIntervalStructFuns;
Scheme_Object **minuteToSecondIntervalStructFuns;

SRPSTRUCT srpStructs[] = {
  { "sql-numeric", &numericStructFuns, numericFields, sizeray(numericFields) },
  { "sql-date", &dateStructFuns, dateFields, sizeray(dateFields) },
  { "sql-time", &timeStructFuns, timeFields, sizeray(timeFields) },
  { "sql-timestamp", &timeStampStructFuns, timeStampFields, sizeray(timeStampFields) },
// #if ODBCVER >= 0x0350
  { "sql-guid", &guidStructFuns, guidFields, sizeray(guidFields) },
// #endif /* 0x0350 */
// #if ODBCVER >= 0x0300
  { "sql-year-interval", &yearIntervalStructFuns, yearIntervalFields, sizeray(yearIntervalFields) },
  { "sql-month-interval", &monthIntervalStructFuns, monthIntervalFields, sizeray(monthIntervalFields) },
  { "sql-day-interval", &dayIntervalStructFuns, dayIntervalFields, sizeray(dayIntervalFields) },
  { "sql-hour-interval", &hourIntervalStructFuns, hourIntervalFields, sizeray(hourIntervalFields) },
  { "sql-minute-interval", &minuteIntervalStructFuns, minuteIntervalFields, sizeray(minuteIntervalFields) },
  { "sql-second-interval", &secondIntervalStructFuns, secondIntervalFields, sizeray(secondIntervalFields) },
  { "sql-year-to-month-interval", &yearToMonthIntervalStructFuns, yearToMonthIntervalFields, sizeray(yearToMonthIntervalFields) },
  { "sql-day-to-hour-interval", &dayToHourIntervalStructFuns, dayToHourIntervalFields, sizeray(dayToHourIntervalFields) },
  { "sql-day-to-minute-interval", &dayToMinuteIntervalStructFuns, dayToMinuteIntervalFields, sizeray(dayToMinuteIntervalFields) },
  { "sql-day-to-second-interval", &dayToSecondIntervalStructFuns, dayToSecondIntervalFields, sizeray(dayToSecondIntervalFields) },
  { "sql-hour-to-minute-interval", &hourToMinuteIntervalStructFuns, hourToMinuteIntervalFields, sizeray(hourToMinuteIntervalFields) },
  { "sql-hour-to-second-interval", &hourToSecondIntervalStructFuns, hourToSecondIntervalFields, sizeray(hourToSecondIntervalFields) },
  { "sql-minute-to-second-interval", &minuteToSecondIntervalStructFuns, minuteToSecondIntervalFields, sizeray(minuteToSecondIntervalFields) },
// #endif /* 0x0300 */
};
