~ubuntu-branches/debian/jessie/sqlheavy/jessie

« back to all changes in this revision

Viewing changes to sqlheavy/sqlheavy-profiling-database.c

  • Committer: Package Import Robot
  • Author(s): Devid Antonio Filoni
  • Date: 2012-05-17 09:47:17 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120517094717-ue17pqaud5tywjj5
Tags: 0.1.1-1
* New upstream release (Closes: #663320).
* Fix debug-package-should-be-priority-extra lintian warning.
* debian/control: switch to vala-0.16 in Build-Depends field.
* debian/libsqlheavy-dev.install, debian/libsqlheavygtk-dev.install:
  install files in vala-0.16 dir.
* Update libsqlheavy0.1-0.symbols.amd64 file.
* debian/rules: update override_dh_makeshlibs target.
* Bump Standards-Version to 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* sqlheavy-profiling-database.c generated by valac 0.12.1, the Vala compiler
 
1
/* sqlheavy-profiling-database.c generated by valac 0.16.0, the Vala compiler
2
2
 * generated from sqlheavy-profiling-database.vala, do not modify */
3
3
 
4
4
 
35
35
        g_return_if_fail (self != NULL);
36
36
        g_return_if_fail (query_result != NULL);
37
37
        {
38
 
                SQLHeavyQuery* _tmp0_ = NULL;
39
 
                const gchar* _tmp1_ = NULL;
40
 
                gdouble _tmp2_;
41
 
                gint _tmp3_;
42
 
                gint _tmp4_;
43
 
                SQLHeavyQueryResult* _tmp5_ = NULL;
44
 
                SQLHeavyQueryResult* _tmp6_;
 
38
                SQLHeavyQuery* _tmp0_;
 
39
                _tmp0_ = self->priv->query;
45
40
                g_static_rec_mutex_lock (&self->priv->__lock_query);
46
 
                _tmp0_ = sql_heavy_query_result_get_query (query_result);
47
 
                _tmp1_ = sql_heavy_query_get_sql (_tmp0_);
48
 
                sql_heavy_query_set_string (self->priv->query, ":sql", _tmp1_, &_inner_error_);
49
 
                if (_inner_error_ != NULL) {
50
 
                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
51
 
                                goto __catch18_sql_heavy_error;
52
 
                        }
53
 
                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
54
 
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
55
 
                        g_clear_error (&_inner_error_);
56
 
                        return;
57
 
                }
58
 
                _tmp2_ = sql_heavy_query_result_get_execution_time (query_result);
59
 
                sql_heavy_query_set_double (self->priv->query, ":clock", _tmp2_, &_inner_error_);
60
 
                if (_inner_error_ != NULL) {
61
 
                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
62
 
                                goto __catch18_sql_heavy_error;
63
 
                        }
64
 
                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
65
 
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
66
 
                        g_clear_error (&_inner_error_);
67
 
                        return;
68
 
                }
69
 
                _tmp3_ = sql_heavy_query_result_get_full_scan_steps (query_result);
70
 
                sql_heavy_query_set_int64 (self->priv->query, ":fullscan_step", (gint64) _tmp3_, &_inner_error_);
71
 
                if (_inner_error_ != NULL) {
72
 
                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
73
 
                                goto __catch18_sql_heavy_error;
74
 
                        }
75
 
                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
76
 
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
77
 
                        g_clear_error (&_inner_error_);
78
 
                        return;
79
 
                }
80
 
                _tmp4_ = sql_heavy_query_result_get_sort_operations (query_result);
81
 
                sql_heavy_query_set_int64 (self->priv->query, ":sort", (gint64) _tmp4_, &_inner_error_);
82
 
                if (_inner_error_ != NULL) {
83
 
                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
84
 
                                goto __catch18_sql_heavy_error;
85
 
                        }
86
 
                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
87
 
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
88
 
                        g_clear_error (&_inner_error_);
89
 
                        return;
90
 
                }
91
 
                _tmp5_ = sql_heavy_query_execute (self->priv->query, NULL, &_inner_error_, NULL);
92
 
                _tmp6_ = _tmp5_;
93
 
                _g_object_unref0 (_tmp6_);
94
 
                if (_inner_error_ != NULL) {
95
 
                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
96
 
                                goto __catch18_sql_heavy_error;
97
 
                        }
98
 
                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
99
 
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
100
 
                        g_clear_error (&_inner_error_);
101
 
                        return;
102
 
                }
103
 
                goto __finally18;
104
 
                __catch18_sql_heavy_error:
105
41
                {
106
 
                        GError * e;
107
 
                        e = _inner_error_;
108
 
                        _inner_error_ = NULL;
109
 
                        g_warning ("sqlheavy-profiling-database.vala:29: Unable to insert entry into profi" \
110
 
"ling database: %s", e->message);
111
 
                        _g_error_free0 (e);
112
 
                }
113
 
                __finally18:
114
 
                if (_inner_error_ != NULL) {
115
 
                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
116
 
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
117
 
                        g_clear_error (&_inner_error_);
118
 
                        return;
 
42
                        {
 
43
                                SQLHeavyQuery* _tmp1_;
 
44
                                SQLHeavyQueryResult* _tmp2_;
 
45
                                SQLHeavyQuery* _tmp3_;
 
46
                                SQLHeavyQuery* _tmp4_;
 
47
                                const gchar* _tmp5_;
 
48
                                const gchar* _tmp6_;
 
49
                                SQLHeavyQuery* _tmp8_;
 
50
                                SQLHeavyQueryResult* _tmp9_;
 
51
                                gdouble _tmp10_;
 
52
                                gdouble _tmp11_;
 
53
                                SQLHeavyQuery* _tmp13_;
 
54
                                SQLHeavyQueryResult* _tmp14_;
 
55
                                gint _tmp15_;
 
56
                                gint _tmp16_;
 
57
                                SQLHeavyQuery* _tmp18_;
 
58
                                SQLHeavyQueryResult* _tmp19_;
 
59
                                gint _tmp20_;
 
60
                                gint _tmp21_;
 
61
                                SQLHeavyQuery* _tmp23_;
 
62
                                SQLHeavyQueryResult* _tmp24_ = NULL;
 
63
                                SQLHeavyQueryResult* _tmp25_;
 
64
                                _tmp1_ = self->priv->query;
 
65
                                _tmp2_ = query_result;
 
66
                                _tmp3_ = sql_heavy_query_result_get_query (_tmp2_);
 
67
                                _tmp4_ = _tmp3_;
 
68
                                _tmp5_ = sql_heavy_query_get_sql (_tmp4_);
 
69
                                _tmp6_ = _tmp5_;
 
70
                                sql_heavy_query_set_string (_tmp1_, ":sql", _tmp6_, &_inner_error_);
 
71
                                if (_inner_error_ != NULL) {
 
72
                                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
 
73
                                                goto __catch18_sql_heavy_error;
 
74
                                        }
 
75
                                        {
 
76
                                                SQLHeavyQuery* _tmp7_;
 
77
                                                _tmp7_ = self->priv->query;
 
78
                                                g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
79
                                        }
 
80
                                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
81
                                        g_clear_error (&_inner_error_);
 
82
                                        return;
 
83
                                }
 
84
                                _tmp8_ = self->priv->query;
 
85
                                _tmp9_ = query_result;
 
86
                                _tmp10_ = sql_heavy_query_result_get_execution_time (_tmp9_);
 
87
                                _tmp11_ = _tmp10_;
 
88
                                sql_heavy_query_set_double (_tmp8_, ":clock", _tmp11_, &_inner_error_);
 
89
                                if (_inner_error_ != NULL) {
 
90
                                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
 
91
                                                goto __catch18_sql_heavy_error;
 
92
                                        }
 
93
                                        {
 
94
                                                SQLHeavyQuery* _tmp12_;
 
95
                                                _tmp12_ = self->priv->query;
 
96
                                                g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
97
                                        }
 
98
                                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
99
                                        g_clear_error (&_inner_error_);
 
100
                                        return;
 
101
                                }
 
102
                                _tmp13_ = self->priv->query;
 
103
                                _tmp14_ = query_result;
 
104
                                _tmp15_ = sql_heavy_query_result_get_full_scan_steps (_tmp14_);
 
105
                                _tmp16_ = _tmp15_;
 
106
                                sql_heavy_query_set_int64 (_tmp13_, ":fullscan_step", (gint64) _tmp16_, &_inner_error_);
 
107
                                if (_inner_error_ != NULL) {
 
108
                                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
 
109
                                                goto __catch18_sql_heavy_error;
 
110
                                        }
 
111
                                        {
 
112
                                                SQLHeavyQuery* _tmp17_;
 
113
                                                _tmp17_ = self->priv->query;
 
114
                                                g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
115
                                        }
 
116
                                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
117
                                        g_clear_error (&_inner_error_);
 
118
                                        return;
 
119
                                }
 
120
                                _tmp18_ = self->priv->query;
 
121
                                _tmp19_ = query_result;
 
122
                                _tmp20_ = sql_heavy_query_result_get_sort_operations (_tmp19_);
 
123
                                _tmp21_ = _tmp20_;
 
124
                                sql_heavy_query_set_int64 (_tmp18_, ":sort", (gint64) _tmp21_, &_inner_error_);
 
125
                                if (_inner_error_ != NULL) {
 
126
                                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
 
127
                                                goto __catch18_sql_heavy_error;
 
128
                                        }
 
129
                                        {
 
130
                                                SQLHeavyQuery* _tmp22_;
 
131
                                                _tmp22_ = self->priv->query;
 
132
                                                g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
133
                                        }
 
134
                                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
135
                                        g_clear_error (&_inner_error_);
 
136
                                        return;
 
137
                                }
 
138
                                _tmp23_ = self->priv->query;
 
139
                                _tmp24_ = sql_heavy_query_execute (_tmp23_, NULL, &_inner_error_, NULL);
 
140
                                _tmp25_ = _tmp24_;
 
141
                                _g_object_unref0 (_tmp25_);
 
142
                                if (_inner_error_ != NULL) {
 
143
                                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
 
144
                                                goto __catch18_sql_heavy_error;
 
145
                                        }
 
146
                                        {
 
147
                                                SQLHeavyQuery* _tmp26_;
 
148
                                                _tmp26_ = self->priv->query;
 
149
                                                g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
150
                                        }
 
151
                                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
152
                                        g_clear_error (&_inner_error_);
 
153
                                        return;
 
154
                                }
 
155
                        }
 
156
                        goto __finally18;
 
157
                        __catch18_sql_heavy_error:
 
158
                        {
 
159
                                GError* e = NULL;
 
160
                                GError* _tmp27_;
 
161
                                const gchar* _tmp28_;
 
162
                                e = _inner_error_;
 
163
                                _inner_error_ = NULL;
 
164
                                _tmp27_ = e;
 
165
                                _tmp28_ = _tmp27_->message;
 
166
                                g_warning ("sqlheavy-profiling-database.vala:29: Unable to insert entry into profi" \
 
167
"ling database: %s", _tmp28_);
 
168
                                _g_error_free0 (e);
 
169
                        }
 
170
                        __finally18:
 
171
                        if (_inner_error_ != NULL) {
 
172
                                {
 
173
                                        SQLHeavyQuery* _tmp29_;
 
174
                                        _tmp29_ = self->priv->query;
 
175
                                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
176
                                }
 
177
                                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
178
                                g_clear_error (&_inner_error_);
 
179
                                return;
 
180
                        }
119
181
                }
120
182
                __finally17:
121
 
                g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
183
                {
 
184
                        SQLHeavyQuery* _tmp30_;
 
185
                        _tmp30_ = self->priv->query;
 
186
                        g_static_rec_mutex_unlock (&self->priv->__lock_query);
 
187
                }
122
188
                if (_inner_error_ != NULL) {
123
189
                        g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
124
190
                        g_clear_error (&_inner_error_);
136
202
SQLHeavyProfilingDatabase* sql_heavy_profiling_database_construct (GType object_type, const gchar* filename, GError** error) {
137
203
        SQLHeavyProfilingDatabase * self = NULL;
138
204
        gchar* _tmp0_ = NULL;
 
205
        gchar* _tmp1_;
 
206
        gchar* _tmp2_ = NULL;
 
207
        gchar* _tmp3_;
139
208
        gchar* schema;
 
209
        const gchar* _tmp4_;
140
210
        GError * _inner_error_ = NULL;
141
 
        _tmp0_ = g_build_filename (SQL_HEAVY_CONFIG_PATH_PACKAGE_DATA, SQL_HEAVY_VERSION_API, "schemas", "profiling", NULL);
142
 
        schema = _tmp0_;
143
 
        self = (SQLHeavyProfilingDatabase*) g_object_new (object_type, "filename", filename, "schema", schema, NULL);
 
211
        _tmp0_ = sql_heavy_version_api ();
 
212
        _tmp1_ = _tmp0_;
 
213
        _tmp2_ = g_build_filename (SQL_HEAVY_CONFIG_PATH_PACKAGE_DATA, _tmp1_, "schemas", "profiling", NULL);
 
214
        _tmp3_ = _tmp2_;
 
215
        _g_free0 (_tmp1_);
 
216
        schema = _tmp3_;
 
217
        _tmp4_ = filename;
 
218
        self = (SQLHeavyProfilingDatabase*) g_object_new (object_type, "filename", _tmp4_, "schema", schema, NULL);
144
219
        sql_heavy_database_init ((SQLHeavyDatabase*) self, NULL, &_inner_error_);
145
220
        if (_inner_error_ != NULL) {
146
221
                if (_inner_error_->domain == SQL_HEAVY_ERROR) {
169
244
        GObject * obj;
170
245
        GObjectClass * parent_class;
171
246
        SQLHeavyProfilingDatabase * self;
172
 
        SQLHeavyQuery* _tmp0_ = NULL;
173
 
        SQLHeavyQuery* _tmp1_;
174
247
        GError * _inner_error_ = NULL;
175
248
        parent_class = G_OBJECT_CLASS (sql_heavy_profiling_database_parent_class);
176
249
        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
177
250
        self = SQL_HEAVY_PROFILING_DATABASE (obj);
178
251
        sql_heavy_database_set_synchronous ((SQLHeavyDatabase*) self, SQL_HEAVY_SYNCHRONOUS_MODE_OFF);
179
252
        sql_heavy_database_set_journal_mode ((SQLHeavyDatabase*) self, SQL_HEAVY_JOURNAL_MODE_OFF);
180
 
        _tmp0_ = sql_heavy_query_new ((SQLHeavyQueryable*) self, "INSERT INTO `queries` (`sql`, `clock`, `fullscan_step`, `sort`) VALUES" \
 
253
        {
 
254
                SQLHeavyQuery* _tmp0_;
 
255
                SQLHeavyQuery* _tmp1_;
 
256
                SQLHeavyQuery* _tmp2_;
 
257
                _tmp0_ = sql_heavy_query_new ((SQLHeavyQueryable*) self, "INSERT INTO `queries` (`sql`, `clock`, `fullscan_step`, `sort`) VALUES" \
181
258
" (:sql, :clock, :fullscan_step, :sort);", &_inner_error_);
182
 
        _tmp1_ = _tmp0_;
183
 
        if (_inner_error_ != NULL) {
184
 
                if (_inner_error_->domain == SQL_HEAVY_ERROR) {
185
 
                        goto __catch19_sql_heavy_error;
 
259
                _tmp1_ = _tmp0_;
 
260
                if (_inner_error_ != NULL) {
 
261
                        if (_inner_error_->domain == SQL_HEAVY_ERROR) {
 
262
                                goto __catch19_sql_heavy_error;
 
263
                        }
 
264
                        g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
265
                        g_clear_error (&_inner_error_);
186
266
                }
187
 
                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
188
 
                g_clear_error (&_inner_error_);
 
267
                _g_object_unref0 (self->priv->query);
 
268
                self->priv->query = _tmp1_;
 
269
                _tmp2_ = self->priv->query;
 
270
                sql_heavy_query_set_auto_clear (_tmp2_, TRUE);
189
271
        }
190
 
        _g_object_unref0 (self->priv->query);
191
 
        self->priv->query = _tmp1_;
192
 
        sql_heavy_query_set_auto_clear (self->priv->query, TRUE);
193
272
        goto __finally19;
194
273
        __catch19_sql_heavy_error:
195
274
        {
196
 
                GError * e;
 
275
                GError* e = NULL;
 
276
                GError* _tmp3_;
 
277
                const gchar* _tmp4_;
 
278
                GError* _tmp5_;
 
279
                gint _tmp6_;
197
280
                e = _inner_error_;
198
281
                _inner_error_ = NULL;
 
282
                _tmp3_ = e;
 
283
                _tmp4_ = _tmp3_->message;
 
284
                _tmp5_ = e;
 
285
                _tmp6_ = _tmp5_->code;
199
286
                g_warning ("sqlheavy-profiling-database.vala:43: Unable to insert profiling inform" \
200
 
"ation: %s (%d)", e->message, e->code);
 
287
"ation: %s (%d)", _tmp4_, _tmp6_);
201
288
                _g_error_free0 (e);
202
289
        }
203
290
        __finally19: