1
/* sqlheavy-0.1.vapi generated by valac 0.12.1, do not modify. */
3
[CCode (cprefix = "SQLHeavy", lower_case_cprefix = "sql_heavy_")]
5
[CCode (cprefix = "SQLHeavyCommonFunction", lower_case_cprefix = "sql_heavy_common_function_")]
6
namespace CommonFunction {
7
[CCode (cheader_filename = "SQLHeavy.h")]
8
public static GLib.Value? compress (SQLHeavy.UserFunction.Context ctx, GLib.ValueArray args) throws SQLHeavy.Error;
9
[CCode (cheader_filename = "SQLHeavy.h")]
10
public static GLib.Value? decompress (SQLHeavy.UserFunction.Context ctx, GLib.ValueArray args) throws SQLHeavy.Error;
11
[CCode (cheader_filename = "SQLHeavy.h")]
12
public static GLib.Value? md5 (SQLHeavy.UserFunction.Context ctx, GLib.ValueArray args) throws SQLHeavy.Error;
13
[CCode (cheader_filename = "SQLHeavy.h")]
14
public static GLib.Value? regex (SQLHeavy.UserFunction.Context ctx, GLib.ValueArray args) throws SQLHeavy.Error;
15
[CCode (cheader_filename = "SQLHeavy.h")]
16
public static GLib.Value? sha1 (SQLHeavy.UserFunction.Context ctx, GLib.ValueArray args) throws SQLHeavy.Error;
17
[CCode (cheader_filename = "SQLHeavy.h")]
18
public static GLib.Value? sha256 (SQLHeavy.UserFunction.Context ctx, GLib.ValueArray args) throws SQLHeavy.Error;
20
[CCode (cprefix = "SQLHeavyUserFunction", lower_case_cprefix = "sql_heavy_user_function_")]
21
namespace UserFunction {
22
[CCode (ref_function = "sql_heavy_user_function_context_ref", unref_function = "sql_heavy_user_function_context_unref", cheader_filename = "SQLHeavy.h")]
23
public class Context {
24
public unowned GLib.Value? get_user_data (string key);
25
public void set_user_data (string key, GLib.Value value);
27
[CCode (cheader_filename = "SQLHeavy.h")]
28
public delegate void FinalizeFunc (SQLHeavy.UserFunction.Context ctx);
29
[CCode (cheader_filename = "SQLHeavy.h")]
30
public delegate GLib.Value? UserFunc (SQLHeavy.UserFunction.Context ctx, GLib.ValueArray args) throws SQLHeavy.Error;
32
[CCode (cprefix = "SQLHeavyVersion", lower_case_cprefix = "sql_heavy_version_")]
34
[CCode (cheader_filename = "SQLHeavy.h")]
35
public const string API;
36
[CCode (cheader_filename = "SQLHeavy.h")]
37
public const int MAJOR;
38
[CCode (cheader_filename = "SQLHeavy.h")]
39
public const int MICRO;
40
[CCode (cheader_filename = "SQLHeavy.h")]
41
public const int MINOR;
42
[CCode (cheader_filename = "SQLHeavy.h")]
43
public const string STRING;
44
[CCode (cheader_filename = "SQLHeavy.h")]
45
public static int library ();
46
[CCode (cheader_filename = "SQLHeavy.h")]
47
public static int sqlite_library ();
49
[CCode (cheader_filename = "SQLHeavy.h")]
50
public class Backup : GLib.Object {
51
public Backup (SQLHeavy.Database source, SQLHeavy.Database destination) throws SQLHeavy.Error;
52
public void execute () throws SQLHeavy.Error;
53
public async void execute_async (GLib.Cancellable? cancellable = null) throws SQLHeavy.Error;
54
public bool step () throws SQLHeavy.Error;
55
public Backup.with_db_names (SQLHeavy.Database source, string? source_name, SQLHeavy.Database destination, string? destination_name) throws SQLHeavy.Error;
56
public SQLHeavy.Database destination_db { get; construct; }
57
public string? destination_db_name { get; construct; }
58
public int remaining_pages { get; }
59
public SQLHeavy.Database source_db { get; construct; }
60
public string? source_db_name { get; construct; }
61
public int total_pages { get; }
62
public signal void stepped ();
64
[CCode (cheader_filename = "SQLHeavy.h")]
65
public class Database : GLib.Object, SQLHeavy.Queryable, GLib.Initable {
66
public Database (string? filename = null, SQLHeavy.FileMode mode = SQLHeavy.FileMode.READ | SQLHeavy.FileMode.WRITE | SQLHeavy.FileMode.CREATE) throws SQLHeavy.Error;
67
public void backup (string destination) throws SQLHeavy.Error;
68
public async void backup_async (string destination) throws SQLHeavy.Error;
69
public static int compare (SQLHeavy.Database? a, SQLHeavy.Database? b);
70
public SQLHeavy.Table get_table (string table) throws SQLHeavy.Error;
71
public GLib.HashTable<string,SQLHeavy.Table> get_tables () throws SQLHeavy.Error;
72
public void incremental_vacuum (int pages) throws SQLHeavy.Error;
73
public virtual bool init (GLib.Cancellable? cancellable = null) throws SQLHeavy.Error;
74
public void interrupt ();
75
public void register_aggregate_function (string name, int argc, owned SQLHeavy.UserFunction.UserFunc func, owned SQLHeavy.UserFunction.FinalizeFunc final);
76
public void register_common_functions ();
77
public void register_scalar_function (string name, int argc, owned SQLHeavy.UserFunction.UserFunc func);
78
public void unregister_function (string name);
79
public void wal_checkpoint (string? database = null) throws SQLHeavy.Error;
80
public SQLHeavy.AutoVacuum auto_vacuum { get; set; }
81
public int cache_size { get; set; }
82
public bool case_sensitive_like { get; set; }
83
public bool count_changes { get; set; }
84
public int default_cache_size { get; set; }
85
public bool empty_result_callbacks { get; set; }
86
public bool enable_profiling { get; set; }
87
public SQLHeavy.Encoding encoding { get; set; }
88
public string filename { get; construct; }
89
public bool foreign_keys { get; set; }
90
public int free_list_count { get; }
91
public bool full_column_names { get; set; }
92
public bool full_fsync { get; set; }
93
public SQLHeavy.JournalMode journal_mode { get; set; }
94
public int journal_size_limit { get; set; }
95
public int64 last_insert_id { get; }
96
public bool legacy_file_format { get; set; }
97
public SQLHeavy.LockingMode locking_mode { get; set; }
98
public int lookaside_used { get; }
99
public int max_page_count { get; set; }
100
public SQLHeavy.FileMode mode { get; construct; }
101
public int page_count { get; set; }
102
public int page_size { get; set; }
103
public bool parser_trace { get; set; }
104
public SQLHeavy.ProfilingDatabase? profiling_data { get; set; }
105
public bool read_uncommitted { get; set; }
106
public bool recursive_triggers { get; set; }
107
public bool reverse_unordered_selects { get; set; }
108
public int schema_version { get; set; }
109
public bool secure_delete { get; set; }
110
public bool short_column_names { get; set; }
111
public SQLHeavy.SynchronousMode synchronous { get; set; }
112
public SQLHeavy.TempStoreMode temp_store { get; set; }
113
public string temp_store_directory { owned get; set; }
114
public int user_version { get; set; }
115
public bool vdbe_listing { get; set; }
116
public bool vdbe_trace { get; set; }
117
public int wal_auto_checkpoint { get; set; }
118
public signal void sql_executed (string sql);
119
public virtual signal void wal_committed (string db_name, int pages);
121
[CCode (cheader_filename = "SQLHeavy.h")]
122
public class ProfilingDatabase : SQLHeavy.VersionedDatabase {
123
public ProfilingDatabase (string? filename = null) throws SQLHeavy.Error;
125
[CCode (cheader_filename = "SQLHeavy.h")]
126
public class Query : GLib.Object, GLib.Initable {
127
public Query (SQLHeavy.Queryable queryable, string sql) throws SQLHeavy.Error;
128
public void bind (int parameter, GLib.Value? value) throws SQLHeavy.Error;
129
public void bind_blob (int field, uint8[] value) throws SQLHeavy.Error;
130
public void bind_byte_array (int field, GLib.ByteArray value) throws SQLHeavy.Error;
131
public void bind_double (int field, double value) throws SQLHeavy.Error;
132
public void bind_int (int field, int value) throws SQLHeavy.Error;
133
public void bind_int64 (int field, int64 value) throws SQLHeavy.Error;
134
public void bind_null (int field) throws SQLHeavy.Error;
135
public void bind_string (int field, string? value) throws SQLHeavy.Error;
136
public void clear ();
137
public SQLHeavy.QueryResult execute (string? first_parameter = null, ...) throws SQLHeavy.Error;
138
public async SQLHeavy.QueryResult execute_async (GLib.Cancellable? cancellable = null) throws SQLHeavy.Error;
139
public int64 execute_insert (string? first_parameter = null, ...) throws SQLHeavy.Error;
140
public async int64 execute_insert_async (GLib.Cancellable? cancellable = null) throws SQLHeavy.Error;
141
public Query.full (SQLHeavy.Queryable queryable, string sql, int sql_max_len = -1, out unowned string? tail = null) throws SQLHeavy.Error;
142
public GLib.GenericArray<GLib.GenericArray<GLib.Value?>> get_table () throws SQLHeavy.Error;
143
public virtual bool init (GLib.Cancellable? cancellable = null) throws SQLHeavy.Error;
144
public int parameter_index (string parameter) throws SQLHeavy.Error;
145
public unowned string parameter_name (int parameter) throws SQLHeavy.Error;
146
public void print_table (GLib.FileStream? fd = null) throws SQLHeavy.Error;
147
public new void @set (string name, GLib.Value? value) throws SQLHeavy.Error;
148
public void set_blob (string field, uint8[] value) throws SQLHeavy.Error;
149
public void set_byte_array (string field, GLib.ByteArray value) throws SQLHeavy.Error;
150
public void set_double (string field, double value) throws SQLHeavy.Error;
151
public void set_int (string field, int value) throws SQLHeavy.Error;
152
public void set_int64 (string field, int64 value) throws SQLHeavy.Error;
153
public void set_null (string field) throws SQLHeavy.Error;
154
public void set_string (string field, string? value) throws SQLHeavy.Error;
155
public bool auto_clear { get; set; }
156
public int parameter_count { get; private set; }
157
public SQLHeavy.Queryable queryable { get; private set; }
158
public string sql { get; construct; }
159
public int sql_length { private get; construct; }
161
[CCode (cheader_filename = "SQLHeavy.h")]
162
public class QueryResult : GLib.Object, SQLHeavy.Record, SQLHeavy.RecordSet {
163
public QueryResult (SQLHeavy.Query query) throws SQLHeavy.Error;
164
public void complete () throws SQLHeavy.Error;
165
public async void complete_async (GLib.Cancellable? cancellable = null) throws SQLHeavy.Error;
166
public string field_origin_name (int field) throws SQLHeavy.Error;
167
public SQLHeavy.Table field_origin_table (int field) throws SQLHeavy.Error;
168
public string field_origin_table_name (int field) throws SQLHeavy.Error;
169
public async bool next_async (GLib.Cancellable? cancellable = null) throws SQLHeavy.Error;
170
public SQLHeavy.ValueArray bindings { get; construct; }
171
public double execution_time { get; }
172
public bool finished { get; private set; }
173
public int full_scan_steps { get; }
174
public SQLHeavy.Query query { get; construct; }
175
public int sort_operations { get; }
176
public signal void received_row ();
178
[CCode (cheader_filename = "SQLHeavy.h")]
179
public class Row : GLib.Object, SQLHeavy.Record, SQLHeavy.MutableRecord {
180
public Row (SQLHeavy.Table table, int64 id = 0);
181
public static int compare (SQLHeavy.Row? a, SQLHeavy.Row? b);
182
public bool auto_save { get; set; }
183
public bool enable_cache { get; set construct; }
184
public int64 id { get; construct; }
185
public SQLHeavy.Table table { get; construct; }
186
public signal void changed ();
187
public signal void deleted ();
188
public signal void field_changed (int field);
190
[CCode (cheader_filename = "SQLHeavy.h")]
191
public class Table : GLib.Object {
192
public Table (SQLHeavy.Queryable queryable, string name) throws SQLHeavy.Error;
193
public static int compare (SQLHeavy.Table? a, SQLHeavy.Table? b);
194
public string field_affinity (int field) throws SQLHeavy.Error;
195
public GLib.Type field_affinity_type (int field) throws SQLHeavy.Error;
196
public int field_index (string name) throws SQLHeavy.Error;
197
public string field_name (int field) throws SQLHeavy.Error;
198
public string foreign_key_from (int foreign_key) throws SQLHeavy.Error;
199
public int foreign_key_index (string foreign_key) throws SQLHeavy.Error;
200
public SQLHeavy.Table foreign_key_table (int foreign_key) throws SQLHeavy.Error;
201
public string foreign_key_table_name (int foreign_key) throws SQLHeavy.Error;
202
public string foreign_key_to (int foreign_key) throws SQLHeavy.Error;
203
public new SQLHeavy.Row @get (int64 id) throws SQLHeavy.Error;
204
public SQLHeavy.TableCursor iterator ();
205
public void register_notify_triggers () throws SQLHeavy.Error;
206
public int field_count { get; }
207
public int foreign_key_count { get; }
208
public string name { get; construct; }
209
public SQLHeavy.Queryable queryable { get; construct; }
210
public signal void row_deleted (int64 row_id);
211
public signal void row_inserted (int64 row_id);
212
public virtual signal void row_modified (int64 row_id);
214
[CCode (cheader_filename = "SQLHeavy.h")]
215
public class TableCursor : GLib.Object, SQLHeavy.RecordSet, SQLHeavy.Cursor {
216
public TableCursor (SQLHeavy.Table table);
217
public int field_count { get; }
218
public int64 offset { get; private set; }
219
public string sort_column { get; set; }
220
public SQLHeavy.SortOrder sort_order { get; set construct; }
221
public SQLHeavy.Table table { get; construct; }
223
[CCode (cheader_filename = "SQLHeavy.h")]
224
public class Transaction : GLib.Object, SQLHeavy.Queryable {
225
public Transaction (SQLHeavy.Queryable parent) throws SQLHeavy.Error;
226
public void commit () throws SQLHeavy.Error;
227
public async void commit_async () throws SQLHeavy.Error;
228
public void rollback () throws SQLHeavy.Error;
229
public async void rollback_async () throws SQLHeavy.Error;
230
public SQLHeavy.Queryable? parent { get; construct; }
231
public SQLHeavy.TransactionStatus status { get; private set; }
232
public signal void resolved (SQLHeavy.TransactionStatus status);
234
[CCode (cheader_filename = "SQLHeavy.h")]
235
public class ValueArray : GLib.Object {
236
public ValueArray (int length = 0);
237
public void append (GLib.Value? value);
238
public void clear ();
239
public SQLHeavy.ValueArray copy ();
240
public new unowned GLib.Value? @get (int index);
241
public void insert (int index, GLib.Value? value);
242
public void insert_padding (int index, int members);
243
public void prepend (GLib.Value? value);
244
public void remove (int index);
245
public new void @set (int index, GLib.Value? value);
246
public void set_byte_array (int index, GLib.ByteArray value);
247
public void set_double (int index, double value);
248
public void set_int (int index, int value);
249
public void set_int64 (int index, int64 value);
250
public void set_null (int index);
251
public void set_string (int index, string value);
252
public int length { get; }
253
public SQLHeavy.ValueArray? source { get; set construct; }
254
public signal void position_changed (int old_index, int new_index);
255
public signal void value_changed (int index);
257
[CCode (cheader_filename = "SQLHeavy.h")]
258
public class VersionedDatabase : SQLHeavy.Database {
259
public VersionedDatabase (string? file, string directory) throws SQLHeavy.Error;
260
public string schema { get; construct; }
262
[CCode (cheader_filename = "SQLHeavy.h")]
263
public interface Cursor : SQLHeavy.RecordSet {
264
public void first () throws SQLHeavy.Error;
265
public abstract SQLHeavy.Record @get () throws SQLHeavy.Error;
266
public void last () throws SQLHeavy.Error;
267
public abstract bool move_to (int64 offset) throws SQLHeavy.Error;
268
public abstract bool previous () throws SQLHeavy.Error;
270
[CCode (cheader_filename = "SQLHeavy.h")]
271
public interface MutableRecord : SQLHeavy.Record {
272
public abstract void @delete () throws SQLHeavy.Error;
273
public abstract void put (int field, GLib.Value value) throws SQLHeavy.Error;
274
public virtual void put_blob (int field, uint8[] value) throws SQLHeavy.Error;
275
public virtual void put_double (int field, double value) throws SQLHeavy.Error;
276
public virtual void put_int (int field, int value) throws SQLHeavy.Error;
277
public virtual void put_int64 (int field, int64 value) throws SQLHeavy.Error;
278
public virtual void put_null (int field) throws SQLHeavy.Error;
279
public virtual void put_string (int field, string? value) throws SQLHeavy.Error;
280
public virtual void put_time_t (int field, time_t value) throws SQLHeavy.Error;
281
public abstract void save () throws SQLHeavy.Error;
282
public virtual void @set (string field, GLib.Value value) throws SQLHeavy.Error;
283
public virtual void set_blob (string field, uint8[] value) throws SQLHeavy.Error;
284
public virtual void set_double (string field, double value) throws SQLHeavy.Error;
285
public virtual void set_int (string field, int value) throws SQLHeavy.Error;
286
public virtual void set_int64 (string field, int64 value) throws SQLHeavy.Error;
287
public virtual void set_null (string field) throws SQLHeavy.Error;
288
public virtual void set_string (string field, string? value) throws SQLHeavy.Error;
289
public virtual void set_time_t (string field, time_t value) throws SQLHeavy.Error;
291
[CCode (cheader_filename = "SQLHeavy.h")]
292
public interface Queryable : GLib.Object {
293
public virtual SQLHeavy.Transaction begin_transaction () throws SQLHeavy.Error;
294
public SQLHeavy.QueryResult execute (string sql, ...) throws SQLHeavy.Error;
295
public int64 execute_insert (string sql, ...) throws SQLHeavy.Error;
296
public abstract void @lock ();
297
public virtual SQLHeavy.Query prepare (string sql) throws SQLHeavy.Error;
298
public virtual void print_table (string sql, GLib.FileStream? fd = null) throws SQLHeavy.Error;
299
public abstract void queue (SQLHeavy.Query query) throws SQLHeavy.Error;
300
public void run (string sql, ...) throws SQLHeavy.Error;
301
public virtual void run_script (string filename) throws SQLHeavy.Error;
302
public abstract void unlock ();
303
public abstract SQLHeavy.Database database { owned get; }
304
public signal void query_executed (SQLHeavy.Query query);
306
[CCode (cheader_filename = "SQLHeavy.h")]
307
public interface Record : GLib.Object {
308
public abstract GLib.Value fetch (int field = 0) throws SQLHeavy.Error;
309
public virtual uint8[] fetch_blob (int field = 0) throws SQLHeavy.Error;
310
public virtual double fetch_double (int field = 0) throws SQLHeavy.Error;
311
public abstract SQLHeavy.Row fetch_foreign_row (int field = 0) throws SQLHeavy.Error;
312
public virtual int fetch_int (int field = 0) throws SQLHeavy.Error;
313
public virtual int64 fetch_int64 (int field = 0) throws SQLHeavy.Error;
314
public virtual GLib.ValueArray fetch_row () throws SQLHeavy.Error;
315
public virtual string? fetch_string (int field = 0) throws SQLHeavy.Error;
316
public virtual time_t fetch_time_t (int field = 0) throws SQLHeavy.Error;
317
public virtual GLib.Value fetch_with_type (GLib.Type requested_type, int field = 0) throws SQLHeavy.Error;
318
public abstract int field_index (string field) throws SQLHeavy.Error;
319
public abstract string field_name (int field = 0) throws SQLHeavy.Error;
320
public virtual string[] field_names ();
321
public abstract GLib.Type field_type (int field = 0) throws SQLHeavy.Error;
322
public virtual GLib.Value? @get (string field) throws SQLHeavy.Error;
323
public virtual uint8[] get_blob (string field) throws SQLHeavy.Error;
324
public virtual double get_double (string field) throws SQLHeavy.Error;
325
public virtual SQLHeavy.Row get_foreign_row (string field) throws SQLHeavy.Error;
326
public virtual int get_int (string field) throws SQLHeavy.Error;
327
public virtual int64 get_int64 (string field) throws SQLHeavy.Error;
328
public virtual string? get_string (string field) throws SQLHeavy.Error;
329
public virtual time_t get_time_t (string field) throws SQLHeavy.Error;
330
public abstract int field_count { get; }
332
[CCode (cheader_filename = "SQLHeavy.h")]
333
public interface RecordSet {
334
public abstract bool next () throws SQLHeavy.Error;
336
[CCode (cprefix = "SQL_HEAVY_AUTO_VACUUM_", cheader_filename = "SQLHeavy.h")]
337
public enum AutoVacuum {
342
[CCode (cprefix = "SQL_HEAVY_ENCODING_", cheader_filename = "SQLHeavy.h")]
343
public enum Encoding {
348
public static SQLHeavy.Encoding from_string (string? encoding);
349
public unowned string to_string ();
351
[CCode (cprefix = "SQL_HEAVY_FILE_MODE_", cheader_filename = "SQLHeavy.h")]
353
public enum FileMode {
358
[CCode (cprefix = "SQL_HEAVY_JOURNAL_MODE_", cheader_filename = "SQLHeavy.h")]
359
public enum JournalMode {
366
public static SQLHeavy.JournalMode from_string (string? journal_mode);
367
public unowned string to_string ();
369
[CCode (cprefix = "SQL_HEAVY_LOCKING_MODE_", cheader_filename = "SQLHeavy.h")]
370
public enum LockingMode {
373
public static SQLHeavy.LockingMode from_string (string? locking_mode);
374
public unowned string to_string ();
376
[CCode (cprefix = "SQL_HEAVY_SORT_ORDER_", cheader_filename = "SQLHeavy.h")]
377
public enum SortOrder {
381
[CCode (cprefix = "SQL_HEAVY_SYNCHRONOUS_MODE_", cheader_filename = "SQLHeavy.h")]
382
public enum SynchronousMode {
386
public static SQLHeavy.SynchronousMode from_string (string? synchronous_mode);
387
public unowned string to_string ();
389
[CCode (cprefix = "SQL_HEAVY_TEMP_STORE_MODE_", cheader_filename = "SQLHeavy.h")]
390
public enum TempStoreMode {
394
public static SQLHeavy.TempStoreMode from_string (string? temp_store_mode);
395
public unowned string to_string ();
397
[CCode (cprefix = "SQL_HEAVY_TRANSACTION_STATUS_", cheader_filename = "SQLHeavy.h")]
398
public enum TransactionStatus {
403
[CCode (cprefix = "SQL_HEAVY_TRANSACTION_TYPE_", cheader_filename = "SQLHeavy.h")]
404
public enum TransactionType {
408
public unowned string to_string ();
410
[CCode (cprefix = "SQL_HEAVY_ERROR_", cheader_filename = "SQLHeavy.h")]
411
public errordomain Error {
442
FEATURE_NOT_SUPPORTED,
446
[CCode (cheader_filename = "SQLHeavy.h")]
447
public static string escape_string (string str);