The R Project SVN R-packages

Rev

Rev 3419 | Rev 3446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3419 Rev 3435
Line 5... Line 5...
5
 
5
 
6
#ifndef __SQLITE_DATAFRAME__
6
#ifndef __SQLITE_DATAFRAME__
7
#define __SQLITE_DATAFRAME__
7
#define __SQLITE_DATAFRAME__
8
 
8
 
9
#define WORKSPACE_COLUMNS 6
9
#define WORKSPACE_COLUMNS 6
10
#ifndef WIN32
-
 
11
#define MAX_ATTACHED 30     /* 31 including workspace.db */
10
#define MAX_ATTACHED 30     /* 31 including workspace.db */
12
#else
-
 
13
#define MAX_ATTACHED 10     /* set to 10 until I have recompiled it to 30 */
-
 
14
#endif
-
 
15
 
11
 
16
/* utilities for checking characteristics of arg */
12
/* utilities for checking characteristics of arg */
17
int _is_r_sym(char *sym);
13
int _is_r_sym(char *sym);
18
int _file_exists(char *filename);
14
int _file_exists(char *filename);
19
int _sdf_exists2(char *iname);
15
int _sdf_exists2(char *iname);
Line 51... Line 47...
51
 
47
 
52
/* global buffer (g_sql_buf) utilities */
48
/* global buffer (g_sql_buf) utilities */
53
int _expand_buf(int i, int size);  /* expand ith buf if size > buf[i].size */
49
int _expand_buf(int i, int size);  /* expand ith buf if size > buf[i].size */
54
 
50
 
55
 
51
 
56
/* sqlite.vector utilities */
-
 
57
SEXP sdf_get_variable(SEXP sdf, SEXP name);
-
 
58
SEXP sdf_detach_sdf(SEXP internal_name);
-
 
59
 
-
 
60
/* workspace utilities */
52
/* workspace utilities */
61
int _prepare_attach2();  /* prepare workspace before attaching a sqlite db */
53
int _prepare_attach2();  /* prepare workspace before attaching a sqlite db */
62
 
54
 
63
/* misc utilities */
55
/* misc utilities */
64
char *_r2iname(char *internal_name, char *filename);
56
char *_r2iname(char *internal_name, char *filename);
Line 114... Line 106...
114
extern sqlite3 *g_workspace;
106
extern sqlite3 *g_workspace;
115
extern char *g_sql_buf[NBUFS];
107
extern char *g_sql_buf[NBUFS];
116
extern int g_sql_buf_sz[NBUFS];
108
extern int g_sql_buf_sz[NBUFS];
117
#endif
109
#endif
118
 
110
 
-
 
111
 
-
 
112
/* top level functions */
-
 
113
/* sqlite_workspace.c */
-
 
114
SEXP sdf_init_workspace();
-
 
115
SEXP sdf_finalize_workspace();
-
 
116
SEXP sdf_list_sdfs(SEXP pattern);
-
 
117
SEXP sdf_get_sdf(SEXP name);
-
 
118
SEXP sdf_attach_sdf(SEXP filename, SEXP internal_name);
-
 
119
SEXP sdf_detach_sdf(SEXP internal_name);
-
 
120
SEXP sdf_rename_sdf(SEXP sdf, SEXP name);
-
 
121
 
-
 
122
/* sqlite_dataframe.c */
-
 
123
SEXP sdf_create_sdf(SEXP df, SEXP name);
-
 
124
SEXP sdf_get_names(SEXP sdf);
-
 
125
SEXP sdf_get_length(SEXP sdf);
-
 
126
SEXP sdf_get_row_count(SEXP sdf);
-
 
127
SEXP sdf_import_table(SEXP _filename, SEXP _name, SEXP _sep, SEXP _quote, 
-
 
128
        SEXP _rownames, SEXP _colnames);
-
 
129
SEXP sdf_get_index(SEXP sdf, SEXP row, SEXP col);
-
 
130
SEXP sdf_rbind(SEXP sdf, SEXP data);
-
 
131
SEXP sdf_get_iname(SEXP sdf);
-
 
132
 
-
 
133
/* sqlite_vector.c */
-
 
134
SEXP sdf_get_variable(SEXP sdf, SEXP name);
-
 
135
SEXP sdf_get_variable_length(SEXP svec);
-
 
136
SEXP sdf_get_variable_index(SEXP svec, SEXP idx);
-
 
137
/* SEXP sdf_set_variable_index(SEXP svec, SEXP idx, SEXP value); */
-
 
138
SEXP sdf_variable_summary(SEXP svec, SEXP maxsum);
-
 
139
SEXP sdf_do_variable_math(SEXP func, SEXP vector, SEXP other_args);
-
 
140
SEXP sdf_do_variable_op(SEXP func, SEXP vector, SEXP op2, SEXP arg_reversed);
-
 
141
SEXP sdf_do_variable_summary(SEXP func, SEXP vector, SEXP na_rm);
-
 
142
SEXP sdf_sort_variable(SEXP svec, SEXP decreasing);
-
 
143
 
-
 
144
/* sqlite_external.c */
-
 
145
SEXP sdf_import_sqlite_table(SEXP _dbfilename, SEXP _tblname, SEXP _sdfiname);
-
 
146
 
-
 
147
/* sqlite_matrix.c */
-
 
148
SEXP sdf_as_matrix(SEXP sdf, SEXP name);
119
#endif
149
#endif