-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.html
658 lines (587 loc) · 35.8 KB
/
models.html
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
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module models</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>models</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/nabeel/Documents/cs373-idb/app/models.py">/home/nabeel/Documents/cs373-idb/app/models.py</a></font></td></tr></table>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial">flask_sqlalchemy.Model(<a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="models.html#Character">Character</a>
</font></dt><dt><font face="helvetica, arial"><a href="models.html#Publisher">Publisher</a>
</font></dt><dt><font face="helvetica, arial"><a href="models.html#Team">Team</a>
</font></dt><dt><font face="helvetica, arial"><a href="models.html#Volume">Volume</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="sqlalchemy.sql.type_api.html#UserDefinedType">sqlalchemy.sql.type_api.UserDefinedType</a>(<a href="sqlalchemy.sql.type_api.html#TypeEngine">sqlalchemy.sql.type_api.TypeEngine</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="models.html#TsVector">TsVector</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Character">class <strong>Character</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>name: name of characters<br>
birth: when the character was born<br>
image: image url<br>
gender: male or female<br>
creator: creator name<br>
volumes: volumes that character is in<br>
teams: teams that character is in<br>
publisher: publisher character is with<br>
appear: first appearance<br>
real: real name if it exists<br>
num_apperances: num of appearnces<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Character">Character</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Character-__init__"><strong>__init__</strong></a>(self, **kwargs)</dt><dd><tt>A simple constructor that allows initialization from kwargs.<br>
<br>
Sets attributes on the constructed instance using the names and<br>
values in ``kwargs``.<br>
<br>
Only keys that are present as<br>
attributes of the instance's class are allowed. These could be,<br>
for example, any mapped columns or relationships.</tt></dd></dl>
<dl><dt><a name="Character-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
<dl><dt><a name="Character-json_it"><strong>json_it</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>appear</strong></dt>
</dl>
<dl><dt><strong>birth</strong></dt>
</dl>
<dl><dt><strong>character_publisher</strong></dt>
</dl>
<dl><dt><strong>character_teams</strong></dt>
</dl>
<dl><dt><strong>character_volumes</strong></dt>
</dl>
<dl><dt><strong>creator</strong></dt>
</dl>
<dl><dt><strong>gender</strong></dt>
</dl>
<dl><dt><strong>image</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>num_appearances</strong></dt>
</dl>
<dl><dt><strong>publisher_name</strong></dt>
</dl>
<dl><dt><strong>real</strong></dt>
</dl>
<dl><dt><strong>tsvector_col</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7f115e82f278; Character></dl>
<dl><dt><strong>__table__</strong> = Table('Character', MetaData(bind=None), Column('...ol', TsVector(), table=<Character>), schema=None)</dl>
<dl><dt><strong>__table_args__</strong> = (Index('character_tsvector_idx', Column('tsvector_col', TsVector(), table=<Character>)),)</dl>
<dl><dt><strong>__tablename__</strong> = 'Character'</dl>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query</strong> = <flask_sqlalchemy.BaseQuery object></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>The default query object used for models, and exposed as<br>
:attr:`~SQLAlchemy.Query`. This can be subclassed and<br>
replaced for individual models by setting the :attr:`~Model.query_class`<br>
attribute. This is a subclass of a standard SQLAlchemy<br>
:class:`~sqlalchemy.orm.query.Query` class and has all the methods of a<br>
standard query as well.</tt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Publisher">class <strong>Publisher</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>name: the name of the publisher<br>
address: address of publisher if given<br>
city: city of publisher<br>
state: state of publisher<br>
deck: description<br>
image: image url<br>
characters: character publisher has worked with<br>
volumes: volumes publisher has worked with<br>
teams: teams publisher has worked with<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Publisher">Publisher</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Publisher-__init__"><strong>__init__</strong></a>(self, **kwargs)</dt><dd><tt>A simple constructor that allows initialization from kwargs.<br>
<br>
Sets attributes on the constructed instance using the names and<br>
values in ``kwargs``.<br>
<br>
Only keys that are present as<br>
attributes of the instance's class are allowed. These could be,<br>
for example, any mapped columns or relationships.</tt></dd></dl>
<dl><dt><a name="Publisher-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
<dl><dt><a name="Publisher-json_it"><strong>json_it</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>address</strong></dt>
</dl>
<dl><dt><strong>city</strong></dt>
</dl>
<dl><dt><strong>deck</strong></dt>
</dl>
<dl><dt><strong>image</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>publisher_characters</strong></dt>
</dl>
<dl><dt><strong>publisher_teams</strong></dt>
</dl>
<dl><dt><strong>publisher_volumes</strong></dt>
</dl>
<dl><dt><strong>state</strong></dt>
</dl>
<dl><dt><strong>tsvector_col</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7f115e856c50; Publisher></dl>
<dl><dt><strong>__table__</strong> = Table('Publisher', MetaData(bind=None), Column('...ol', TsVector(), table=<Publisher>), schema=None)</dl>
<dl><dt><strong>__table_args__</strong> = (Index('publishers_tsvector_idx', Column('tsvector_col', TsVector(), table=<Publisher>)),)</dl>
<dl><dt><strong>__tablename__</strong> = 'Publisher'</dl>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query</strong> = <flask_sqlalchemy.BaseQuery object></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>The default query object used for models, and exposed as<br>
:attr:`~SQLAlchemy.Query`. This can be subclassed and<br>
replaced for individual models by setting the :attr:`~Model.query_class`<br>
attribute. This is a subclass of a standard SQLAlchemy<br>
:class:`~sqlalchemy.orm.query.Query` class and has all the methods of a<br>
standard query as well.</tt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Team">class <strong>Team</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>name: name of team<br>
description: description of team<br>
image: image url<br>
publisher: main publisher for team<br>
characters: characters in team<br>
volumes: volumes that team appeard in<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Team">Team</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Team-__init__"><strong>__init__</strong></a>(self, **kwargs)</dt><dd><tt>A simple constructor that allows initialization from kwargs.<br>
<br>
Sets attributes on the constructed instance using the names and<br>
values in ``kwargs``.<br>
<br>
Only keys that are present as<br>
attributes of the instance's class are allowed. These could be,<br>
for example, any mapped columns or relationships.</tt></dd></dl>
<dl><dt><a name="Team-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
<dl><dt><a name="Team-json_it"><strong>json_it</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>appear</strong></dt>
</dl>
<dl><dt><strong>description</strong></dt>
</dl>
<dl><dt><strong>image</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>num_appearances</strong></dt>
</dl>
<dl><dt><strong>publisher_name</strong></dt>
</dl>
<dl><dt><strong>team_characters</strong></dt>
</dl>
<dl><dt><strong>team_publisher</strong></dt>
</dl>
<dl><dt><strong>team_volumes</strong></dt>
</dl>
<dl><dt><strong>tsvector_col</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7f115e856400; Team></dl>
<dl><dt><strong>__table__</strong> = Table('Team', MetaData(bind=None), Column('name'...tor_col', TsVector(), table=<Team>), schema=None)</dl>
<dl><dt><strong>__table_args__</strong> = (Index('team_tsvector_idx', Column('tsvector_col', TsVector(), table=<Team>)),)</dl>
<dl><dt><strong>__tablename__</strong> = 'Team'</dl>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query</strong> = <flask_sqlalchemy.BaseQuery object></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>The default query object used for models, and exposed as<br>
:attr:`~SQLAlchemy.Query`. This can be subclassed and<br>
replaced for individual models by setting the :attr:`~Model.query_class`<br>
attribute. This is a subclass of a standard SQLAlchemy<br>
:class:`~sqlalchemy.orm.query.Query` class and has all the methods of a<br>
standard query as well.</tt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="TsVector">class <strong>TsVector</strong></a>(<a href="sqlalchemy.sql.type_api.html#UserDefinedType">sqlalchemy.sql.type_api.UserDefinedType</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Holds a <a href="#TsVector">TsVector</a> column which is the data type needed<br>
for the texxt search<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#TsVector">TsVector</a></dd>
<dd><a href="sqlalchemy.sql.type_api.html#UserDefinedType">sqlalchemy.sql.type_api.UserDefinedType</a></dd>
<dd><a href="sqlalchemy.sql.type_api.html#TypeEngine">sqlalchemy.sql.type_api.TypeEngine</a></dd>
<dd><a href="sqlalchemy.sql.visitors.html#Visitable">sqlalchemy.sql.visitors.Visitable</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="TsVector-get_col_spec"><strong>get_col_spec</strong></a>(self)</dt><dd><tt>we just return tsvector</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>name</strong> = 'TSVECTOR'</dl>
<hr>
Methods inherited from <a href="sqlalchemy.sql.type_api.html#UserDefinedType">sqlalchemy.sql.type_api.UserDefinedType</a>:<br>
<dl><dt><a name="TsVector-coerce_compared_value"><strong>coerce_compared_value</strong></a>(self, op, value)</dt><dd><tt>Suggest a type for a 'coerced' Python value in an expression.<br>
<br>
Default behavior for :class:`.<a href="sqlalchemy.sql.type_api.html#UserDefinedType">UserDefinedType</a>` is the<br>
same as that of :class:`.TypeDecorator`; by default it returns<br>
``self``, assuming the compared value should be coerced into<br>
the same type as this one. See<br>
:meth:`.TypeDecorator.coerce_compared_value` for more detail.<br>
<br>
.. versionchanged:: 0.8 :meth:`.<a href="sqlalchemy.sql.type_api.html#UserDefinedType">UserDefinedType</a>.coerce_compared_value`<br>
now returns ``self`` by default, rather than falling onto the<br>
more fundamental behavior of<br>
:meth:`.TypeEngine.coerce_compared_value`.</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="sqlalchemy.sql.type_api.html#UserDefinedType">sqlalchemy.sql.type_api.UserDefinedType</a>:<br>
<dl><dt><strong>Comparator</strong> = <class 'sqlalchemy.sql.type_api.UserDefinedType.Comparator'></dl>
<dl><dt><strong>__visit_name__</strong> = 'user_defined'</dl>
<dl><dt><strong>comparator_factory</strong> = <class 'sqlalchemy.sql.type_api.UserDefinedType.Comparator'></dl>
<dl><dt><strong>ensure_kwarg</strong> = 'get_col_spec'</dl>
<hr>
Methods inherited from <a href="sqlalchemy.sql.type_api.html#TypeEngine">sqlalchemy.sql.type_api.TypeEngine</a>:<br>
<dl><dt><a name="TsVector-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
<dl><dt><a name="TsVector-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>Return str(self).</tt></dd></dl>
<dl><dt><a name="TsVector-adapt"><strong>adapt</strong></a>(self, cls, **kw)</dt><dd><tt>Produce an "adapted" form of this type, given an "impl" class<br>
to work with.<br>
<br>
This method is used internally to associate generic<br>
types with "implementation" types that are specific to a particular<br>
dialect.</tt></dd></dl>
<dl><dt><a name="TsVector-bind_expression"><strong>bind_expression</strong></a>(self, bindvalue)</dt><dd><tt>"Given a bind value (i.e. a :class:`.BindParameter` instance),<br>
return a SQL expression in its place.<br>
<br>
This is typically a SQL function that wraps the existing bound<br>
parameter within the statement. It is used for special data types<br>
that require literals being wrapped in some special database function<br>
in order to coerce an application-level value into a database-specific<br>
format. It is the SQL analogue of the<br>
:meth:`.TypeEngine.bind_processor` method.<br>
<br>
The method is evaluated at statement compile time, as opposed<br>
to statement construction time.<br>
<br>
Note that this method, when implemented, should always return<br>
the exact same structure, without any conditional logic, as it<br>
may be used in an executemany() call against an arbitrary number<br>
of bound parameter sets.<br>
<br>
See also:<br>
<br>
:ref:`types_sql_value_processing`</tt></dd></dl>
<dl><dt><a name="TsVector-bind_processor"><strong>bind_processor</strong></a>(self, dialect)</dt><dd><tt>Return a conversion function for processing bind values.<br>
<br>
Returns a callable which will receive a bind parameter value<br>
as the sole positional argument and will return a value to<br>
send to the DB-API.<br>
<br>
If processing is not necessary, the method should return ``None``.<br>
<br>
:param dialect: Dialect instance in use.</tt></dd></dl>
<dl><dt><a name="TsVector-column_expression"><strong>column_expression</strong></a>(self, colexpr)</dt><dd><tt>Given a SELECT column expression, return a wrapping SQL expression.<br>
<br>
This is typically a SQL function that wraps a column expression<br>
as rendered in the columns clause of a SELECT statement.<br>
It is used for special data types that require<br>
columns to be wrapped in some special database function in order<br>
to coerce the value before being sent back to the application.<br>
It is the SQL analogue of the :meth:`.TypeEngine.result_processor`<br>
method.<br>
<br>
The method is evaluated at statement compile time, as opposed<br>
to statement construction time.<br>
<br>
See also:<br>
<br>
:ref:`types_sql_value_processing`</tt></dd></dl>
<dl><dt><a name="TsVector-compare_against_backend"><strong>compare_against_backend</strong></a>(self, dialect, conn_type)</dt><dd><tt>Compare this type against the given backend type.<br>
<br>
This function is currently not implemented for SQLAlchemy<br>
types, and for all built in types will return ``None``. However,<br>
it can be implemented by a user-defined type<br>
where it can be consumed by schema comparison tools such as<br>
Alembic autogenerate.<br>
<br>
A future release of SQLAlchemy will potentially impement this method<br>
for builtin types as well.<br>
<br>
The function should return True if this type is equivalent to the<br>
given type; the type is typically reflected from the database<br>
so should be database specific. The dialect in use is also<br>
passed. It can also return False to assert that the type is<br>
not equivalent.<br>
<br>
:param dialect: a :class:`.Dialect` that is involved in the comparison.<br>
<br>
:param conn_type: the type object reflected from the backend.<br>
<br>
.. versionadded:: 1.0.3</tt></dd></dl>
<dl><dt><a name="TsVector-compare_values"><strong>compare_values</strong></a>(self, x, y)</dt><dd><tt>Compare two values for equality.</tt></dd></dl>
<dl><dt><a name="TsVector-compile"><strong>compile</strong></a>(self, dialect=None)</dt><dd><tt>Produce a string-compiled form of this :class:`.TypeEngine`.<br>
<br>
When called with no arguments, uses a "default" dialect<br>
to produce a string result.<br>
<br>
:param dialect: a :class:`.Dialect` instance.</tt></dd></dl>
<dl><dt><a name="TsVector-copy_value"><strong>copy_value</strong></a>(self, value)</dt></dl>
<dl><dt><a name="TsVector-dialect_impl"><strong>dialect_impl</strong></a>(self, dialect)</dt><dd><tt>Return a dialect-specific implementation for this<br>
:class:`.TypeEngine`.</tt></dd></dl>
<dl><dt><a name="TsVector-get_dbapi_type"><strong>get_dbapi_type</strong></a>(self, dbapi)</dt><dd><tt>Return the corresponding type object from the underlying DB-API, if<br>
any.<br>
<br>
This can be useful for calling ``setinputsizes()``, for example.</tt></dd></dl>
<dl><dt><a name="TsVector-literal_processor"><strong>literal_processor</strong></a>(self, dialect)</dt><dd><tt>Return a conversion function for processing literal values that are<br>
to be rendered directly without using binds.<br>
<br>
This function is used when the compiler makes use of the<br>
"literal_binds" flag, typically used in DDL generation as well<br>
as in certain scenarios where backends don't accept bound parameters.<br>
<br>
.. versionadded:: 0.9.0</tt></dd></dl>
<dl><dt><a name="TsVector-result_processor"><strong>result_processor</strong></a>(self, dialect, coltype)</dt><dd><tt>Return a conversion function for processing result row values.<br>
<br>
Returns a callable which will receive a result row column<br>
value as the sole positional argument and will return a value<br>
to return to the user.<br>
<br>
If processing is not necessary, the method should return ``None``.<br>
<br>
:param dialect: Dialect instance in use.<br>
<br>
:param coltype: DBAPI coltype argument received in cursor.description.</tt></dd></dl>
<dl><dt><a name="TsVector-with_variant"><strong>with_variant</strong></a>(self, type_, dialect_name)</dt><dd><tt>Produce a new type object that will utilize the given<br>
type when applied to the dialect of the given name.<br>
<br>
e.g.::<br>
<br>
from sqlalchemy.types import String<br>
from sqlalchemy.dialects import mysql<br>
<br>
s = String()<br>
<br>
s = s.<a href="#TsVector-with_variant">with_variant</a>(mysql.VARCHAR(collation='foo'), 'mysql')<br>
<br>
The construction of :meth:`.TypeEngine.with_variant` is always<br>
from the "fallback" type to that which is dialect specific.<br>
The returned type is an instance of :class:`.Variant`, which<br>
itself provides a :meth:`.Variant.with_variant`<br>
that can be called repeatedly.<br>
<br>
:param type_: a :class:`.TypeEngine` that will be selected<br>
as a variant from the originating type, when a dialect<br>
of the given name is in use.<br>
:param dialect_name: base name of the dialect which uses<br>
this type. (i.e. ``'postgresql'``, ``'mysql'``, etc.)<br>
<br>
.. versionadded:: 0.7.2</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="sqlalchemy.sql.type_api.html#TypeEngine">sqlalchemy.sql.type_api.TypeEngine</a>:<br>
<dl><dt><strong>python_type</strong></dt>
<dd><tt>Return the Python type object expected to be returned<br>
by instances of this type, if known.<br>
<br>
Basically, for those types which enforce a return type,<br>
or are known across the board to do such for all common<br>
DBAPIs (like ``int`` for example), will return that type.<br>
<br>
If a return type is not defined, raises<br>
``NotImplementedError``.<br>
<br>
Note that any type also accommodates NULL in SQL which<br>
means you can also get back ``None`` from any type<br>
in practice.</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="sqlalchemy.sql.type_api.html#TypeEngine">sqlalchemy.sql.type_api.TypeEngine</a>:<br>
<dl><dt><strong>hashable</strong> = True</dl>
<hr>
Data descriptors inherited from <a href="sqlalchemy.sql.visitors.html#Visitable">sqlalchemy.sql.visitors.Visitable</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Volume">class <strong>Volume</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>image: image url<br>
description: info on volume<br>
count_of_issues: num issues in volume<br>
start_year: when volume started<br>
publisher: main publisher<br>
characters: characters in volume<br>
teams: teams in the characters<br>
name: name of volume<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Volume">Volume</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Volume-__init__"><strong>__init__</strong></a>(self, **kwargs)</dt><dd><tt>A simple constructor that allows initialization from kwargs.<br>
<br>
Sets attributes on the constructed instance using the names and<br>
values in ``kwargs``.<br>
<br>
Only keys that are present as<br>
attributes of the instance's class are allowed. These could be,<br>
for example, any mapped columns or relationships.</tt></dd></dl>
<dl><dt><a name="Volume-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Return repr(self).</tt></dd></dl>
<dl><dt><a name="Volume-json_it"><strong>json_it</strong></a>(self)</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>description</strong></dt>
</dl>
<dl><dt><strong>image</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>num_issues</strong></dt>
</dl>
<dl><dt><strong>publisher_name</strong></dt>
</dl>
<dl><dt><strong>start_year</strong></dt>
</dl>
<dl><dt><strong>tsvector_col</strong></dt>
</dl>
<dl><dt><strong>volume_characters</strong></dt>
</dl>
<dl><dt><strong>volume_publisher</strong></dt>
</dl>
<dl><dt><strong>volume_teams</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7f115e82fb38; Volume></dl>
<dl><dt><strong>__table__</strong> = Table('Volume', MetaData(bind=None), Column('ima...r_col', TsVector(), table=<Volume>), schema=None)</dl>
<dl><dt><strong>__table_args__</strong> = (Index('volume_tsvector_idx', Column('tsvector_col', TsVector(), table=<Volume>)),)</dl>
<dl><dt><strong>__tablename__</strong> = 'Volume'</dl>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query</strong> = <flask_sqlalchemy.BaseQuery object></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>The default query object used for models, and exposed as<br>
:attr:`~SQLAlchemy.Query`. This can be subclassed and<br>
replaced for individual models by setting the :attr:`~Model.query_class`<br>
attribute. This is a subclass of a standard SQLAlchemy<br>
:class:`~sqlalchemy.orm.query.Query` class and has all the methods of a<br>
standard query as well.</tt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>CHARACTER_VECTOR_TRIGGER</strong> = <DDL@139712716047024; '\n CREATE TRIGGER char...'name\', \'publisher_name\', \'appear\' )\n '><br>
<strong>PUBLISHER_VECTOR_TRIGGER</strong> = <DDL@139712659012016; '\n CREATE TRIGGER publ...name\', \'city\', \'state\', \'address\')\n '><br>
<strong>TEAM_VECTOR_TRIGGER</strong> = <DDL@139712576971328; '\n CREATE TRIGGER team...\'name\', \'publisher_name\', \'appear\')\n '><br>
<strong>VOLUME_VECTOR_TRIGGER</strong> = <DDL@139712576813376; '\n CREATE TRIGGER volu...e\', \'start_year\', \'publisher_name\' )\n '><br>
<strong>characters_teams</strong> = Table('characters_teams', MetaData(bind=None), C...m.name'), table=<characters_teams>), schema=None)<br>
<strong>characters_volumes</strong> = Table('characters_volumes', MetaData(bind=None),...name'), table=<characters_volumes>), schema=None)<br>
<strong>db</strong> = <SQLAlchemy engine='postgresql://postgres:batman@localhost/donn'><br>
<strong>func</strong> = <sqlalchemy.sql.functions._FunctionGenerator object><br>
<strong>volumes_teams</strong> = Table('volumes_teams', MetaData(bind=None), Colu...Team.name'), table=<volumes_teams>), schema=None)</td></tr></table>
</body></html>