Repository navigation
Expand file tree
/
Copy pathquery_sql.rbs
More file actions
603 lines (429 loc) · 17 KB
/
Copy pathquery_sql.rbs
File metadata and controls
603 lines (429 loc) · 17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
# auto-generated by sqlc - do not edit
module Sqlite3Codegen
GET_AUTHOR_SQL: ::String
class GetAuthorRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
LIST_AUTHORS_SQL: ::String
class ListAuthorsRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
CREATE_AUTHOR_SQL: ::String
DELETE_AUTHOR_SQL: ::String
LIST_AUTHORS_PAGED_SQL: ::String
class ListAuthorsPagedRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
GET_AUTHOR_BY_NAME_PATTERN_SQL: ::String
class GetAuthorByNamePatternRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
GET_AUTHORS_BY_OPTIONAL_NAME_SQL: ::String
class GetAuthorsByOptionalNameRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
CREATE_AUTHOR_RETURN_ID_SQL: ::String
class CreateAuthorReturnIdRow
attr_reader id: ::Integer
def initialize: ( ::Integer id) -> void
end
UPDATE_AUTHOR_BIOS_SQL: ::String
GET_AUTHORS_BY_IDS_SQL: ::String
class GetAuthorsByIdsRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
GET_AUTHORS_BY_IDS_AND_NAMES_SQL: ::String
class GetAuthorsByIdsAndNamesRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
GET_AUTHORS_BY_MIXED_PLACEHOLDERS_SQL: ::String
class GetAuthorsByMixedPlaceholdersRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
GET_AUTHORS_BY_REPEATED_NAMED_AND_POSITIONAL_SQL: ::String
class GetAuthorsByRepeatedNamedAndPositionalRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
GET_AUTHORS_BY_REPEATED_NAMED_AND_POSITIONAL_BATCH_SQL: ::String
class GetAuthorsByRepeatedNamedAndPositionalBatchRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
class GetAuthorsByRepeatedNamedAndPositionalBatchArgs
attr_reader n: ::String
attr_reader other: ::String
attr_reader id: ::Integer
def initialize: ( ::String n, ::String other, ::Integer id) -> void
end
class CopyAuthorsArgs
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::String name, ::String? bio) -> void
end
class CopyAuthorsNamedArgs
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::String name, ::String? bio) -> void
end
TRUNCATE_AUTHORS_SQL: ::String
CREATE_BOOK_SQL: ::String
class CreateBookRow
attr_reader id: ::Integer
def initialize: ( ::Integer id) -> void
end
LIST_ALL_AUTHORS_BOOKS_SQL: ::String
class ListAllAuthorsBooksRow
attr_reader author: Author
attr_reader book: Book
def initialize: ( Author author, Book book) -> void
end
GET_DUPLICATE_AUTHORS_SQL: ::String
class GetDuplicateAuthorsRow
attr_reader author: Author
attr_reader author2: Author
def initialize: ( Author author, Author author2) -> void
end
GET_AUTHORS_BY_BOOK_NAME_SQL: ::String
class GetAuthorsByBookNameRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
attr_reader book: Book
def initialize: ( ::Integer id, ::String name, ::String? bio, Book book) -> void
end
CREATE_AUTHOR_RESULT_SQL: ::String
CREATE_AUTHORS_BATCH_SQL: ::String
class CreateAuthorsBatchArgs
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::String name, ::String? bio) -> void
end
GET_AUTHOR_BATCH_SQL: ::String
class GetAuthorBatchRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
class GetAuthorBatchArgs
attr_reader id: ::Integer
def initialize: ( ::Integer id) -> void
end
LIST_AUTHORS_BY_NAME_BATCH_SQL: ::String
class ListAuthorsByNameBatchRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
class ListAuthorsByNameBatchArgs
attr_reader name: ::String
def initialize: ( ::String name) -> void
end
INSERT_DECLARED_TYPES_SQL: ::String
GET_DECLARED_TYPES_SQL: ::String
class GetDeclaredTypesRow
attr_reader c_varchar: ::String?
attr_reader c_decimal: ::Float?
attr_reader c_unsigned_big_int: ::Integer?
attr_reader c_native: ::String?
attr_reader c_double: ::Float?
attr_reader c_json: ::String?
attr_reader c_uuid: ::String?
def initialize: (
::String? c_varchar,
::Float? c_decimal,
::Integer? c_unsigned_big_int,
::String? c_native,
::Float? c_double,
::String? c_json,
::String? c_uuid
) -> void
end
TRUNCATE_DECLARED_TYPES_SQL: ::String
CREATE_REGRESSION_SQL: ::String
class CreateRegressionRow
attr_reader id: ::Integer
def initialize: ( ::Integer id) -> void
end
UPDATE_REGRESSION_PRICES_SQL: ::String
class UpdateRegressionPricesRow
attr_reader id: ::Integer
def initialize: ( ::Integer id) -> void
end
class CopyRegressionsArgs
attr_reader order: ::String
attr_reader price: ::Float?
def initialize: ( ::String order, ::Float? price) -> void
end
LIST_REGRESSIONS_SQL: ::String
class ListRegressionsRow
attr_reader id: ::Integer
attr_reader order: ::String
attr_reader price: ::Float?
def initialize: ( ::Integer id, ::String order, ::Float? price) -> void
end
GET_MAX_REGRESSION_PRICE_SQL: ::String
class GetMaxRegressionPriceRow
attr_reader max_price: untyped
def initialize: ( untyped max_price) -> void
end
TRUNCATE_REGRESSIONS_SQL: ::String
class CopyRegressionRowsArgs
attr_reader id: ::Integer
attr_reader order: ::String
attr_reader price: ::Float?
attr_reader payload: ::String?
def initialize: ( ::Integer id, ::String order, ::Float? price, ::String? payload) -> void
end
LIST_REGRESSION_ROWS_SQL: ::String
class ListRegressionRowsRow
attr_reader id: ::Integer
attr_reader order: ::String
attr_reader price: ::Float?
attr_reader payload: ::String?
def initialize: ( ::Integer id, ::String order, ::Float? price, ::String? payload) -> void
end
TRUNCATE_REGRESSION_ROWS_SQL: ::String
PAUSE_QUERY_SQL: ::String
class PauseQueryRow
attr_reader sleep: untyped
def initialize: ( untyped sleep) -> void
end
class CopyTagsOrReplaceArgs
attr_reader name: ::String
attr_reader uses: ::Integer
def initialize: ( ::String name, ::Integer uses) -> void
end
class CopyTagsOrIgnoreArgs
attr_reader name: ::String
attr_reader uses: ::Integer
def initialize: ( ::String name, ::Integer uses) -> void
end
class CopyTagsAddingUsesArgs
attr_reader name: ::String
attr_reader uses: ::Integer
def initialize: ( ::String name, ::Integer uses) -> void
end
LIST_TAGS_SQL: ::String
class ListTagsRow
attr_reader name: ::String
attr_reader uses: ::Integer
def initialize: ( ::String name, ::Integer uses) -> void
end
TRUNCATE_TAGS_SQL: ::String
LIST_AUTHORS_WITH_OPTIONAL_BOOK_SQL: ::String
class ListAuthorsWithOptionalBookRow
attr_reader author: Author?
attr_reader book: Book?
def initialize: ( Author? author, Book? book) -> void
end
INSERT_NAME_CASE_SQL: ::String
GET_NAME_CASE_SQL: ::String
class GetNameCaseRow
attr_reader id: ::Integer
attr_reader class_: ::String
attr_reader end: ::String
attr_reader hash_: ::String
attr_reader method_: ::String
attr_reader count: ::Integer
attr_reader camelCase: ::String
attr_reader HTTPServer: ::String
attr_reader initialize_: ::String
def initialize: (
::Integer id,
::String class_,
::String end,
::String hash_,
::String method_,
::Integer count,
::String camelCase,
::String HTTPServer,
::String initialize_
) -> void
end
GET_HTTP_SERVER_SQL: ::String
class GetHTTPServerRow
attr_reader id: ::Integer
attr_reader class_: ::String
attr_reader end: ::String
attr_reader hash_: ::String
attr_reader method_: ::String
attr_reader count: ::Integer
attr_reader camelCase: ::String
attr_reader HTTPServer: ::String
attr_reader initialize_: ::String
def initialize: (
::Integer id,
::String class_,
::String end,
::String hash_,
::String method_,
::Integer count,
::String camelCase,
::String HTTPServer,
::String initialize_
) -> void
end
TRUNCATE_NAME_CASES_SQL: ::String
class CopyMixedCaseCopiesArgs
attr_reader id: ::Integer
attr_reader some_value: ::String?
def initialize: ( ::Integer id, ::String? some_value) -> void
end
LIST_MIXED_CASE_COPIES_SQL: ::String
class ListMixedCaseCopiesRow
attr_reader Id: ::Integer
attr_reader SomeValue: ::String?
def initialize: ( ::Integer Id, ::String? SomeValue) -> void
end
GET_UNNAMED_COLUMNS_SQL: ::String
class GetUnnamedColumnsRow
attr_reader column_1: ::Integer
attr_reader column_2: ::String
def initialize: ( ::Integer column_1, ::String column_2) -> void
end
GET_QUOTED_ALIAS_SQL: ::String
class GetQuotedAliasRow
attr_reader it_s: ::Integer
def initialize: ( ::Integer it_s) -> void
end
GET_AUTHORS_NOT_IN_IDS_SQL: ::String
class GetAuthorsNotInIdsRow
attr_reader id: ::Integer
attr_reader name: ::String
attr_reader bio: ::String?
def initialize: ( ::Integer id, ::String name, ::String? bio) -> void
end
CREATE_AUTHOR_OR_ROLLBACK_SQL: ::String
CREATE_TAG_RESULT_SQL: ::String
class CreateTagResultRow
attr_reader name: ::String
def initialize: ( ::String name) -> void
end
CREATE_EXCEPTION_SQL: ::String
COUNT_EXCEPTIONS_SQL: ::String
class CountExceptionsRow
attr_reader n: ::Integer
def initialize: ( ::Integer n) -> void
end
HAS_AUTHORS_SQL: ::String
class HasAuthorsRow
attr_reader has_any: ::Integer
def initialize: ( ::Integer has_any) -> void
end
class QuerySql
class NotFound < ::StandardError
end
def initialize: (untyped db, ?logger: untyped) -> void
def transaction: [T] (?mode: (:deferred | :immediate | :exclusive)?) { (self) -> T } -> T
class ExecResult
attr_reader rows_affected: ::Integer
attr_reader last_insert_id: ::Integer?
def initialize: ( ::Integer rows_affected, ::Integer? last_insert_id) -> void
end
def get_author: (id: ::Integer) -> GetAuthorRow?
def get_author!: (id: ::Integer) -> GetAuthorRow
def list_authors: -> ::Array[ListAuthorsRow]
def create_author: (name: ::String, bio: ::String?) -> void
def delete_author: (id: ::Integer) -> void
def list_authors_paged: (offset: ::Integer, limit: ::Integer) -> ::Array[ListAuthorsPagedRow]
def get_author_by_name_pattern: (?name_pattern: ::String?) -> ::Array[GetAuthorByNamePatternRow]
def get_authors_by_optional_name: (lim: ::Integer, ?name_filter: untyped) -> ::Array[GetAuthorsByOptionalNameRow]
def create_author_return_id: (name: ::String, bio: ::String?) -> ::Integer?
def update_author_bios: (bio: ::String?) -> ::Integer
def get_authors_by_ids: (ids: ::Array[::Integer]) -> ::Array[GetAuthorsByIdsRow]
def get_authors_by_ids_and_names: (ids: ::Array[::Integer], names: ::Array[::String]) -> ::Array[GetAuthorsByIdsAndNamesRow]
def get_authors_by_mixed_placeholders: (n: ::String, ids: ::Array[::Integer], id: ::Integer, more: ::Array[::Integer]) -> ::Array[GetAuthorsByMixedPlaceholdersRow]
def get_authors_by_repeated_named_and_positional: (n: ::String, other: ::String, id: ::Integer) -> ::Array[GetAuthorsByRepeatedNamedAndPositionalRow]
def get_authors_by_repeated_named_and_positional_batch: (::Array[GetAuthorsByRepeatedNamedAndPositionalBatchArgs] rows) -> ::Array[GetAuthorsByRepeatedNamedAndPositionalBatchRow?]
def copy_authors: (::Array[CopyAuthorsArgs] rows) -> void
def copy_authors_named: (::Array[CopyAuthorsNamedArgs] rows) -> void
def truncate_authors: -> void
def create_book: (name: ::String, author_id: ::Integer) -> ::Integer?
def list_all_authors_books: -> ::Array[ListAllAuthorsBooksRow]
def get_duplicate_authors: -> ::Array[GetDuplicateAuthorsRow]
def get_authors_by_book_name: (name: ::String) -> ::Array[GetAuthorsByBookNameRow]
def create_author_result: (name: ::String, bio: ::String?) -> ExecResult
def create_authors_batch: (::Array[CreateAuthorsBatchArgs] rows) -> void
def get_author_batch: (::Array[GetAuthorBatchArgs] rows) -> ::Array[GetAuthorBatchRow?]
def list_authors_by_name_batch: (::Array[ListAuthorsByNameBatchArgs] rows) -> ::Array[::Array[ListAuthorsByNameBatchRow]]
def insert_declared_types: (c_varchar: ::String?, c_decimal: ::Float?, c_unsigned_big_int: ::Integer?, c_native: ::String?, c_double: ::Float?, c_json: ::String?, c_uuid: ::String?) -> void
def get_declared_types: -> GetDeclaredTypesRow?
def get_declared_types!: -> GetDeclaredTypesRow
def truncate_declared_types: -> void
def create_regression: (order: ::String, price: ::Float?) -> void
def update_regression_prices: (price: ::Float?) -> ::Integer
def copy_regressions: (::Array[CopyRegressionsArgs] rows) -> void
def list_regressions: -> ::Array[ListRegressionsRow]
def get_max_regression_price: -> GetMaxRegressionPriceRow?
def get_max_regression_price!: -> GetMaxRegressionPriceRow
def truncate_regressions: -> void
def copy_regression_rows: (::Array[CopyRegressionRowsArgs] rows) -> void
def list_regression_rows: -> ::Array[ListRegressionRowsRow]
def truncate_regression_rows: -> void
def pause_query: (sleep: untyped) -> void
def copy_tags_or_replace: (::Array[CopyTagsOrReplaceArgs] rows) -> void
def copy_tags_or_ignore: (::Array[CopyTagsOrIgnoreArgs] rows) -> void
def copy_tags_adding_uses: (::Array[CopyTagsAddingUsesArgs] rows) -> void
def list_tags: -> ::Array[ListTagsRow]
def truncate_tags: -> void
def list_authors_with_optional_book: -> ::Array[ListAuthorsWithOptionalBookRow]
def insert_name_case: (id: ::Integer, class_: ::String, end_: ::String, hash: ::String, method: ::String, count: ::Integer, camel_case: ::String, http_server: ::String, initialize: ::String) -> void
def get_name_case: (id: ::Integer, class_: ::String, end_: ::String, hash: ::String, method: ::String, count: ::Integer, http_server: ::String, camel_case: ::String, initialize: ::String) -> GetNameCaseRow?
def get_name_case!: (id: ::Integer, class_: ::String, end_: ::String, hash: ::String, method: ::String, count: ::Integer, http_server: ::String, camel_case: ::String, initialize: ::String) -> GetNameCaseRow
def get_http_server: (id: ::Integer) -> GetHTTPServerRow?
def get_http_server!: (id: ::Integer) -> GetHTTPServerRow
def truncate_name_cases: -> void
def copy_mixed_case_copies: (::Array[CopyMixedCaseCopiesArgs] rows) -> void
def list_mixed_case_copies: -> ::Array[ListMixedCaseCopiesRow]
def get_unnamed_columns: -> GetUnnamedColumnsRow?
def get_unnamed_columns!: -> GetUnnamedColumnsRow
def get_quoted_alias: -> GetQuotedAliasRow?
def get_quoted_alias!: -> GetQuotedAliasRow
def get_authors_not_in_ids: (ids: ::Array[::Integer]) -> ::Array[GetAuthorsNotInIdsRow]
def create_author_or_rollback: (id: ::Integer, name: ::String) -> void
def create_tag_result: (name: ::String, uses: ::Integer) -> ExecResult
def create_exception: -> void
def count_exceptions: -> CountExceptionsRow?
def count_exceptions!: -> CountExceptionsRow
def has_authors: -> HasAuthorsRow?
def has_authors!: -> HasAuthorsRow
private
def instrument: [T] (::String name) { () -> T } -> T
def with_client: [T] (::String name) { (untyped) -> T } -> T
def bound_to: (TransactionConnection connection) -> self
def execute_statement: (untyped stmt, *untyped params) -> untyped
def atomically: (untyped client) { () -> void } -> void
def slice_placeholders: (::Array[untyped] values) -> ::String
end
end