| Top |
| float | retrieve_float () |
| int | get_native_db_data () |
| int | get_remote_db_data () |
| int | get_pcgive_db_data () |
| int | get_rats_db_data () |
| dbwrapper * | read_rats_db () |
| dbwrapper * | read_pcgive_db () |
| dbwrapper * | dbwrapper_new () |
| void | dbwrapper_destroy () |
| double * | compact_db_series () |
| double * | expand_db_series () |
| int | set_db_name () |
| const char * | get_db_name () |
| int | set_odbc_dsn () |
| int | db_set_sample () |
| int | db_get_series () |
| int | db_delete_series_by_name () |
| int | db_delete_series_by_number () |
| void | get_db_padding () |
| int | db_range_check () |
| int | check_db_import () |
| int | lib_add_db_data () |
| int | compact_data_set () |
| int | expand_data_set () |
| int | midas_days_per_period () |
| #define | DB_DESCRIP_LEN |
| enum | DBError |
| typedef | dbnumber |
| SERIESINFO | |
| dbwrapper | |
| #define | ODBC_OBSCOLS |
| ODBC_info | |
| netfloat |
Functions that read data from native gretl databases as well as RATS 4.0 and PcGive databases. As you will see, this area is mostly undocumented at present, but since it may ultimately be useful for third-party coders we will try to remedy this!
int get_rats_db_data (const char *fname,SERIESINFO *sinfo,double **Z);
Read the actual data values for a series from a RATS database.
dbwrapper * read_rats_db (const char *fname,FILE *fp);
Read the series info from a RATS 4.0 database: read the base block at offset 0 in the data file, and recurse through the directory entries.
dbwrapper * read_pcgive_db (const char *fname,FILE *fp);
Read the series info from a PcGive database, .in7 file
void
dbwrapper_destroy (dbwrapper *dw);
Frees all resources associated with dw
as well as the pointer
itself.
double * compact_db_series (const double *src,SERIESINFO *sinfo,int target_pd,CompactMethod method);
double * expand_db_series (const double *src,SERIESINFO *sinfo,int target_pd,int interpol);
int lib_add_db_data (double **dbZ,SERIESINFO *sinfo,DATASET *dset,CompactMethod cmethod,int interpolate,int dbv,PRN *prn);
int compact_data_set (DATASET *dset,int newpd,CompactMethod default_method,int monstart,int repday);
Compact the data set from higher to lower frequency.
dset |
dataset struct. |
|
newpd |
target data frequency. |
|
default_method |
code for the default compaction method. |
|
monstart |
if non-zero, take Monday rather than Sunday as the "start of the week" (only relevant for 7-day daily data). |
|
repday |
"representative day" for conversion from daily
to weekly data (with method |
int expand_data_set (DATASET *dset,int newpd,int interpol);
Expand the data set from lower to higher frequency: an "expert" option. This is supported at present only for expansion from annual to quarterly or monthly, or from quarterly to monthly.
typedef struct {
int t1, t2, v;
char varname[VNAMELEN];
char descrip[MAXLABEL];
int nobs;
char stobs[OBSLEN];
char endobs[OBSLEN];
int pd;
int offset;
int err;
int undated;
} SERIESINFO;
typedef struct {
char *fname;
int dbtype;
int nv;
int nalloc;
SERIESINFO *sinfo;
} dbwrapper;
typedef struct {
char *dsn;
char *username;
char *password;
char *query;
char **fmts;
char coltypes[ODBC_OBSCOLS];
double **X;
char **S;
int nrows;
int obscols;
int nvars;
} ODBC_info;