File: functions.html

package info (click to toggle)
sqlalchemy 0.9.8%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,952 kB
  • ctags: 24,534
  • sloc: python: 152,282; ansic: 1,346; makefile: 257; xml: 17
file content (927 lines) | stat: -rw-r--r-- 72,819 bytes parent folder | download
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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        
        <title>
            
    
                SQL and Generic Functions
             &mdash;
    SQLAlchemy 0.9 Documentation

        </title>

        
            <!-- begin iterate through SQLA + sphinx environment css_files -->
                <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
                <link rel="stylesheet" href="../_static/docs.css" type="text/css" />
                <link rel="stylesheet" href="../_static/sphinx_paramlinks.css" type="text/css" />
                <link rel="stylesheet" href="../_static/changelog.css" type="text/css" />
            <!-- end iterate through SQLA + sphinx environment css_files -->
        

        

    

    <!-- begin layout.mako headers -->

    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../',
          VERSION:     '0.9.8',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html'
      };
    </script>

    <!-- begin iterate through sphinx environment script_files -->
        <script type="text/javascript" src="../_static/jquery.js"></script>
        <script type="text/javascript" src="../_static/underscore.js"></script>
        <script type="text/javascript" src="../_static/doctools.js"></script>
    <!-- end iterate through sphinx environment script_files -->

    <script type="text/javascript" src="../_static/detectmobile.js"></script>
    <script type="text/javascript" src="../_static/init.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
        <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="SQLAlchemy 0.9 Documentation" href="../index.html" />
        <link rel="up" title="SQL Statements and Expressions API" href="expression_api.html" />
        <link rel="next" title="Column and Data Types" href="types.html" />
        <link rel="prev" title="Insert, Updates, Deletes" href="dml.html" />
    <!-- end layout.mako headers -->


    </head>
    <body>
        















<div id="docs-container">





<div id="docs-top-navigation-container" class="body-background">
<div id="docs-header">
    <div id="docs-version-header">
        Release: <span class="version-num">0.9.8</span> | Release Date: October 13, 2014
    </div>

    <h1>SQLAlchemy 0.9 Documentation</h1>

</div>
</div>

<div id="docs-body-container">

    <div id="fixed-sidebar" class="withsidebar">


        <div id="docs-sidebar-popout">
            <h3><a href="../index.html">SQLAlchemy 0.9 Documentation</a></h3>

            <p id="sidebar-paginate">
                    <a href="expression_api.html" title="SQL Statements and Expressions API">Up</a> |

                    <a href="dml.html" title="Insert, Updates, Deletes">Prev</a> |
                    <a href="types.html" title="Column and Data Types">Next</a>
            </p>

            <p id="sidebar-topnav">
                <a href="../index.html">Contents</a> |
                <a href="../genindex.html">Index</a>
            </p>

            <div id="sidebar-search">
                <form class="search" action="../search.html" method="get">
                  <input type="text" name="q" size="12" /> <input type="submit" value="Search" />
                  <input type="hidden" name="check_keywords" value="yes" />
                  <input type="hidden" name="area" value="default" />
                </form>
            </div>

        </div>

        <div id="docs-sidebar">

        <h3><a href="#">            
                SQL and Generic Functions
            
        </a></h3>
        <ul>
<li><a class="reference internal" href="#">SQL and Generic Functions</a></li>
</ul>




        </div>

    </div>

    

    <div id="docs-body" class="withsidebar" >
        
<div class="section" id="module-sqlalchemy.sql.expression">
<span id="sql-and-generic-functions"></span><span id="generic-functions"></span><span id="functions-toplevel"></span><h1>SQL and Generic Functions<a class="headerlink" href="#module-sqlalchemy.sql.expression" title="Permalink to this headline">¶</a></h1>
<p>SQL functions which are known to SQLAlchemy with regards to database-specific
rendering, return types and argument behavior. Generic functions are invoked
like all SQL functions, using the <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.func" title="sqlalchemy.sql.expression.func"><tt class="xref py py-attr docutils literal"><span class="pre">func</span></tt></a> attribute:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">func</span><span class="o">.</span><span class="n">count</span><span class="p">()])</span><span class="o">.</span><span class="n">select_from</span><span class="p">(</span><span class="n">sometable</span><span class="p">)</span></pre></div>
</div>
<p>Note that any name not known to <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.func" title="sqlalchemy.sql.expression.func"><tt class="xref py py-attr docutils literal"><span class="pre">func</span></tt></a> generates the function name as is
- there is no restriction on what SQL functions can be called, known or
unknown to SQLAlchemy, built-in or user defined. The section here only
describes those functions where SQLAlchemy already knows what argument and
return types are in use.</p>
<span class="target" id="module-sqlalchemy.sql.functions"></span><p>SQL function API, factories, and built-in functions.</p>
<dl class="class">
<dt id="sqlalchemy.sql.functions.AnsiFunction">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">AnsiFunction</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.AnsiFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.AnsiFunction.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'AnsiFunction'</em><a class="headerlink" href="#sqlalchemy.sql.functions.AnsiFunction.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.AnsiFunction.name">
<tt class="descname">name</tt><em class="property"> = 'AnsiFunction'</em><a class="headerlink" href="#sqlalchemy.sql.functions.AnsiFunction.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.Function">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">Function</tt><big>(</big><em>name</em>, <em>*clauses</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.Function" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.FunctionElement</span></tt></a></p>
<p>Describe a named SQL function.</p>
<p>See the superclass <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a> for a description
of public methods.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> - namespace which produces registered or ad-hoc
<a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a> instances.</p>
<p class="last"><a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">GenericFunction</span></tt></a> - allows creation of registered function
types.</p>
</div>
<dl class="method">
<dt id="sqlalchemy.sql.functions.Function.__init__">
<tt class="descname">__init__</tt><big>(</big><em>name</em>, <em>*clauses</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.Function.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a <a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a>.</p>
<p>The <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> construct is normally used to construct
new <a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a> instances.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.FunctionElement">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">FunctionElement</tt><big>(</big><em>*clauses</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="selectable.html#sqlalchemy.sql.expression.Executable" title="sqlalchemy.sql.expression.Executable"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.expression.Executable</span></tt></a>, <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.ColumnElement" title="sqlalchemy.sql.expression.ColumnElement"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.expression.ColumnElement</span></tt></a>, <a class="reference internal" href="selectable.html#sqlalchemy.sql.expression.FromClause" title="sqlalchemy.sql.expression.FromClause"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.expression.FromClause</span></tt></a></p>
<p>Base for SQL function-oriented constructs.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a> - named SQL function.</p>
<p><a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> - namespace which produces registered or ad-hoc
<a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a> instances.</p>
<p class="last"><a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">GenericFunction</span></tt></a> - allows creation of registered function
types.</p>
</div>
<dl class="method">
<dt id="sqlalchemy.sql.functions.FunctionElement.__init__">
<tt class="descname">__init__</tt><big>(</big><em>*clauses</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.sql.functions.FunctionElement.alias">
<tt class="descname">alias</tt><big>(</big><em>name=None</em>, <em>flat=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.alias" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce a <a class="reference internal" href="selectable.html#sqlalchemy.sql.expression.Alias" title="sqlalchemy.sql.expression.Alias"><tt class="xref py py-class docutils literal"><span class="pre">Alias</span></tt></a> construct against this
<a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a>.</p>
<p>This construct wraps the function in a named alias which
is suitable for the FROM clause.</p>
<p>e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sqlalchemy.sql</span> <span class="kn">import</span> <span class="n">column</span>

<span class="n">stmt</span> <span class="o">=</span> <span class="n">select</span><span class="p">([</span><span class="n">column</span><span class="p">(</span><span class="s">&#39;data&#39;</span><span class="p">)])</span><span class="o">.</span><span class="n">select_from</span><span class="p">(</span>
    <span class="n">func</span><span class="o">.</span><span class="n">unnest</span><span class="p">(</span><span class="n">Table</span><span class="o">.</span><span class="n">data</span><span class="p">)</span><span class="o">.</span><span class="n">alias</span><span class="p">(</span><span class="s">&#39;data_view&#39;</span><span class="p">)</span>
<span class="p">)</span></pre></div>
</div>
<p>Would produce:</p>
<div class="highlight-sql"><div class="highlight"><pre><span class="k">SELECT</span> <span class="k">data</span>
<span class="k">FROM</span> <span class="k">unnest</span><span class="p">(</span><span class="n">sometable</span><span class="p">.</span><span class="k">data</span><span class="p">)</span> <span class="k">AS</span> <span class="n">data_view</span></pre></div>
</div>
<div class="versionadded">
<p><span>New in version 0.9.8: </span>The <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement.alias" title="sqlalchemy.sql.functions.FunctionElement.alias"><tt class="xref py py-meth docutils literal"><span class="pre">FunctionElement.alias()</span></tt></a> method
is now supported.  Previously, this method&#8217;s behavior was
undefined and did not behave consistently across versions.</p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.FunctionElement.clauses">
<tt class="descname">clauses</tt><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.clauses" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the underlying <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.ClauseList" title="sqlalchemy.sql.expression.ClauseList"><tt class="xref py py-class docutils literal"><span class="pre">ClauseList</span></tt></a> which contains
the arguments for this <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.FunctionElement.columns">
<tt class="descname">columns</tt><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.columns" title="Permalink to this definition">¶</a></dt>
<dd><p>The set of columns exported by this <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a>.</p>
<p>Function objects currently have no result column names built in;
this method returns a single-element column collection with
an anonymously named column.</p>
<p>An interim approach to providing named columns for a function
as a FROM clause is to build a <a class="reference internal" href="selectable.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><tt class="xref py py-func docutils literal"><span class="pre">select()</span></tt></a> with the
desired columns:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sqlalchemy.sql</span> <span class="kn">import</span> <span class="n">column</span>

<span class="n">stmt</span> <span class="o">=</span> <span class="n">select</span><span class="p">([</span><span class="n">column</span><span class="p">(</span><span class="s">&#39;x&#39;</span><span class="p">),</span> <span class="n">column</span><span class="p">(</span><span class="s">&#39;y&#39;</span><span class="p">)])</span><span class="o">.</span>                <span class="n">select_from</span><span class="p">(</span><span class="n">func</span><span class="o">.</span><span class="n">myfunction</span><span class="p">())</span></pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.sql.functions.FunctionElement.execute">
<tt class="descname">execute</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.execute" title="Permalink to this definition">¶</a></dt>
<dd><p>Execute this <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a> against an embedded
&#8216;bind&#8217;.</p>
<p>This first calls <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement.select" title="sqlalchemy.sql.functions.FunctionElement.select"><tt class="xref py py-meth docutils literal"><span class="pre">select()</span></tt></a> to
produce a SELECT construct.</p>
<p>Note that <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a> can be passed to
the <a class="reference internal" href="connections.html#sqlalchemy.engine.Connectable.execute" title="sqlalchemy.engine.Connectable.execute"><tt class="xref py py-meth docutils literal"><span class="pre">Connectable.execute()</span></tt></a> method of <a class="reference internal" href="connections.html#sqlalchemy.engine.Connection" title="sqlalchemy.engine.Connection"><tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt></a>
or <a class="reference internal" href="connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><tt class="xref py py-class docutils literal"><span class="pre">Engine</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.sql.functions.FunctionElement.get_children">
<tt class="descname">get_children</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.get_children" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="sqlalchemy.sql.functions.FunctionElement.over">
<tt class="descname">over</tt><big>(</big><em>partition_by=None</em>, <em>order_by=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.over" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce an OVER clause against this function.</p>
<p>Used against aggregate or so-called &#8220;window&#8221; functions,
for database backends that support window functions.</p>
<p>The expression:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">func</span><span class="o">.</span><span class="n">row_number</span><span class="p">()</span><span class="o">.</span><span class="n">over</span><span class="p">(</span><span class="n">order_by</span><span class="o">=</span><span class="s">&#39;x&#39;</span><span class="p">)</span></pre></div>
</div>
<p>is shorthand for:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sqlalchemy</span> <span class="kn">import</span> <span class="n">over</span>
<span class="n">over</span><span class="p">(</span><span class="n">func</span><span class="o">.</span><span class="n">row_number</span><span class="p">(),</span> <span class="n">order_by</span><span class="o">=</span><span class="s">&#39;x&#39;</span><span class="p">)</span></pre></div>
</div>
<p>See <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.over" title="sqlalchemy.sql.expression.over"><tt class="xref py py-func docutils literal"><span class="pre">over()</span></tt></a> for a full description.</p>
<div class="versionadded">
<p><span>New in version 0.7.</span></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.FunctionElement.packagenames">
<tt class="descname">packagenames</tt><em class="property"> = ()</em><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.packagenames" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="sqlalchemy.sql.functions.FunctionElement.scalar">
<tt class="descname">scalar</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.scalar" title="Permalink to this definition">¶</a></dt>
<dd><p>Execute this <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a> against an embedded
&#8216;bind&#8217; and return a scalar value.</p>
<p>This first calls <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement.select" title="sqlalchemy.sql.functions.FunctionElement.select"><tt class="xref py py-meth docutils literal"><span class="pre">select()</span></tt></a> to
produce a SELECT construct.</p>
<p>Note that <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a> can be passed to
the <a class="reference internal" href="connections.html#sqlalchemy.engine.Connectable.scalar" title="sqlalchemy.engine.Connectable.scalar"><tt class="xref py py-meth docutils literal"><span class="pre">Connectable.scalar()</span></tt></a> method of <a class="reference internal" href="connections.html#sqlalchemy.engine.Connection" title="sqlalchemy.engine.Connection"><tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt></a>
or <a class="reference internal" href="connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><tt class="xref py py-class docutils literal"><span class="pre">Engine</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.sql.functions.FunctionElement.select">
<tt class="descname">select</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.FunctionElement.select" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce a <a class="reference internal" href="selectable.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><tt class="xref py py-func docutils literal"><span class="pre">select()</span></tt></a> construct
against this <a class="reference internal" href="#sqlalchemy.sql.functions.FunctionElement" title="sqlalchemy.sql.functions.FunctionElement"><tt class="xref py py-class docutils literal"><span class="pre">FunctionElement</span></tt></a>.</p>
<p>This is shorthand for:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">s</span> <span class="o">=</span> <span class="n">select</span><span class="p">([</span><span class="n">function_element</span><span class="p">])</span></pre></div>
</div>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.GenericFunction">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">GenericFunction</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.GenericFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.Function</span></tt></a></p>
<p>Define a &#8216;generic&#8217; function.</p>
<p>A generic function is a pre-established <a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a>
class that is instantiated automatically when called
by name from the <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> attribute.    Note that
calling any name from <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> has the effect that
a new <a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a> instance is created automatically,
given that name.  The primary use case for defining
a <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">GenericFunction</span></tt></a> class is so that a function
of a particular name may be given a fixed return type.
It can also include custom argument parsing schemes as well
as additional methods.</p>
<p>Subclasses of <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">GenericFunction</span></tt></a> are automatically
registered under the name of the class.  For
example, a user-defined function <tt class="docutils literal"><span class="pre">as_utc()</span></tt> would
be available immediately:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sqlalchemy.sql.functions</span> <span class="kn">import</span> <span class="n">GenericFunction</span>
<span class="kn">from</span> <span class="nn">sqlalchemy.types</span> <span class="kn">import</span> <span class="n">DateTime</span>

<span class="k">class</span> <span class="nc">as_utc</span><span class="p">(</span><span class="n">GenericFunction</span><span class="p">):</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="n">DateTime</span>

<span class="k">print</span> <span class="n">select</span><span class="p">([</span><span class="n">func</span><span class="o">.</span><span class="n">as_utc</span><span class="p">()])</span></pre></div>
</div>
<p>User-defined generic functions can be organized into
packages by specifying the &#8220;package&#8221; attribute when defining
<a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">GenericFunction</span></tt></a>.   Third party libraries
containing many functions may want to use this in order
to avoid name conflicts with other systems.   For example,
if our <tt class="docutils literal"><span class="pre">as_utc()</span></tt> function were part of a package
&#8220;time&#8221;:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">as_utc</span><span class="p">(</span><span class="n">GenericFunction</span><span class="p">):</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="n">DateTime</span>
    <span class="n">package</span> <span class="o">=</span> <span class="s">&quot;time&quot;</span></pre></div>
</div>
<p>The above function would be available from <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a>
using the package name <tt class="docutils literal"><span class="pre">time</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">select</span><span class="p">([</span><span class="n">func</span><span class="o">.</span><span class="n">time</span><span class="o">.</span><span class="n">as_utc</span><span class="p">()])</span></pre></div>
</div>
<p>A final option is to allow the function to be accessed
from one name in <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> but to render as a different name.
The <tt class="docutils literal"><span class="pre">identifier</span></tt> attribute will override the name used to
access the function as loaded from <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a>, but will retain
the usage of <tt class="docutils literal"><span class="pre">name</span></tt> as the rendered name:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">GeoBuffer</span><span class="p">(</span><span class="n">GenericFunction</span><span class="p">):</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="n">Geometry</span>
    <span class="n">package</span> <span class="o">=</span> <span class="s">&quot;geo&quot;</span>
    <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;ST_Buffer&quot;</span>
    <span class="n">identifier</span> <span class="o">=</span> <span class="s">&quot;buffer&quot;</span></pre></div>
</div>
<p>The above function will render as follows:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">func</span><span class="o">.</span><span class="n">geo</span><span class="o">.</span><span class="n">buffer</span><span class="p">()</span>
<span class="go">ST_Buffer()</span></pre></div>
</div>
<div class="versionadded">
<p><span>New in version 0.8: </span><a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">GenericFunction</span></tt></a> now supports
automatic registration of new functions as well as package
and custom naming support.</p>
</div>
<div class="versionchanged">
<p><span>Changed in version 0.8: </span>The attribute name <tt class="docutils literal"><span class="pre">type</span></tt> is used
to specify the function&#8217;s return type at the class level.
Previously, the name <tt class="docutils literal"><span class="pre">__return_type__</span></tt> was used.  This
name is still recognized for backwards-compatibility.</p>
</div>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.GenericFunction.coerce_arguments">
<tt class="descname">coerce_arguments</tt><em class="property"> = True</em><a class="headerlink" href="#sqlalchemy.sql.functions.GenericFunction.coerce_arguments" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.GenericFunction.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'GenericFunction'</em><a class="headerlink" href="#sqlalchemy.sql.functions.GenericFunction.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.GenericFunction.name">
<tt class="descname">name</tt><em class="property"> = 'GenericFunction'</em><a class="headerlink" href="#sqlalchemy.sql.functions.GenericFunction.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.ReturnTypeFromArgs">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">ReturnTypeFromArgs</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.ReturnTypeFromArgs" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<p>Define a function whose return type is the same as its arguments.</p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.ReturnTypeFromArgs.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'ReturnTypeFromArgs'</em><a class="headerlink" href="#sqlalchemy.sql.functions.ReturnTypeFromArgs.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.ReturnTypeFromArgs.name">
<tt class="descname">name</tt><em class="property"> = 'ReturnTypeFromArgs'</em><a class="headerlink" href="#sqlalchemy.sql.functions.ReturnTypeFromArgs.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.char_length">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">char_length</tt><big>(</big><em>arg</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.char_length" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.char_length.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'char_length'</em><a class="headerlink" href="#sqlalchemy.sql.functions.char_length.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.char_length.name">
<tt class="descname">name</tt><em class="property"> = 'char_length'</em><a class="headerlink" href="#sqlalchemy.sql.functions.char_length.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.char_length.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.char_length.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">Integer</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.coalesce">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">coalesce</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.coalesce" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.ReturnTypeFromArgs" title="sqlalchemy.sql.functions.ReturnTypeFromArgs"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.ReturnTypeFromArgs</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.coalesce.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'coalesce'</em><a class="headerlink" href="#sqlalchemy.sql.functions.coalesce.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.coalesce.name">
<tt class="descname">name</tt><em class="property"> = 'coalesce'</em><a class="headerlink" href="#sqlalchemy.sql.functions.coalesce.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.concat">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">concat</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.concat" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.concat.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'concat'</em><a class="headerlink" href="#sqlalchemy.sql.functions.concat.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.concat.name">
<tt class="descname">name</tt><em class="property"> = 'concat'</em><a class="headerlink" href="#sqlalchemy.sql.functions.concat.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.concat.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.concat.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">String</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.count">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">count</tt><big>(</big><em>expression=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.count" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<p>The ANSI COUNT aggregate function.  With no arguments,
emits COUNT *.</p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.count.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'count'</em><a class="headerlink" href="#sqlalchemy.sql.functions.count.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.count.name">
<tt class="descname">name</tt><em class="property"> = 'count'</em><a class="headerlink" href="#sqlalchemy.sql.functions.count.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.count.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.count.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">Integer</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.current_date">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">current_date</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.current_date" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_date.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'current_date'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_date.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_date.name">
<tt class="descname">name</tt><em class="property"> = 'current_date'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_date.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_date.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.current_date.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">Date</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.current_time">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">current_time</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.current_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_time.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'current_time'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_time.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_time.name">
<tt class="descname">name</tt><em class="property"> = 'current_time'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_time.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_time.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.current_time.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">Time</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.current_timestamp">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">current_timestamp</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.current_timestamp" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_timestamp.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'current_timestamp'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_timestamp.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_timestamp.name">
<tt class="descname">name</tt><em class="property"> = 'current_timestamp'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_timestamp.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_timestamp.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.current_timestamp.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">DateTime</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.current_user">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">current_user</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.current_user" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_user.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'current_user'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_user.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_user.name">
<tt class="descname">name</tt><em class="property"> = 'current_user'</em><a class="headerlink" href="#sqlalchemy.sql.functions.current_user.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.current_user.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.current_user.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">String</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="data">
<dt id="sqlalchemy.sql.functions.func">
<tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">func</tt><em class="property"> = &lt;sqlalchemy.sql.functions._FunctionGenerator object at 0x10371c4d0&gt;</em><a class="headerlink" href="#sqlalchemy.sql.functions.func" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate SQL function expressions.</p>
<p><a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> is a special object instance which generates SQL
functions based on name-based attributes, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">func</span><span class="o">.</span><span class="n">count</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="go">count(:param_1)</span></pre></div>
</div>
<p>The element is a column-oriented SQL element like any other, and is
used in that way:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">select</span><span class="p">([</span><span class="n">func</span><span class="o">.</span><span class="n">count</span><span class="p">(</span><span class="n">table</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">id</span><span class="p">)])</span>
<span class="go">SELECT count(sometable.id) FROM sometable</span></pre></div>
</div>
<p>Any name can be given to <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a>. If the function name is unknown to
SQLAlchemy, it will be rendered exactly as is. For common SQL functions
which SQLAlchemy is aware of, the name may be interpreted as a <em>generic
function</em> which will be compiled appropriately to the target database:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">func</span><span class="o">.</span><span class="n">current_timestamp</span><span class="p">()</span>
<span class="go">CURRENT_TIMESTAMP</span></pre></div>
</div>
<p>To call functions which are present in dot-separated packages,
specify them in the same manner:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">func</span><span class="o">.</span><span class="n">stats</span><span class="o">.</span><span class="n">yield_curve</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
<span class="go">stats.yield_curve(:yield_curve_1, :yield_curve_2)</span></pre></div>
</div>
<p>SQLAlchemy can be made aware of the return type of functions to enable
type-specific lexical and result-based behavior. For example, to ensure
that a string-based function returns a Unicode value and is similarly
treated as a string in expressions, specify
<a class="reference internal" href="types.html#sqlalchemy.types.Unicode" title="sqlalchemy.types.Unicode"><tt class="xref py py-class docutils literal"><span class="pre">Unicode</span></tt></a> as the type:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">func</span><span class="o">.</span><span class="n">my_string</span><span class="p">(</span><span class="s">u&#39;hi&#39;</span><span class="p">,</span> <span class="n">type_</span><span class="o">=</span><span class="n">Unicode</span><span class="p">)</span> <span class="o">+</span> <span class="s">&#39; &#39;</span> <span class="o">+</span> \
<span class="gp">... </span><span class="n">func</span><span class="o">.</span><span class="n">my_string</span><span class="p">(</span><span class="s">u&#39;there&#39;</span><span class="p">,</span> <span class="n">type_</span><span class="o">=</span><span class="n">Unicode</span><span class="p">)</span>
<span class="go">my_string(:my_string_1) || :my_string_2 || my_string(:my_string_3)</span></pre></div>
</div>
<p>The object returned by a <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> call is usually an instance of
<a class="reference internal" href="#sqlalchemy.sql.functions.Function" title="sqlalchemy.sql.functions.Function"><tt class="xref py py-class docutils literal"><span class="pre">Function</span></tt></a>.
This object meets the &#8220;column&#8221; interface, including comparison and labeling
functions.  The object can also be passed the <a class="reference internal" href="connections.html#sqlalchemy.engine.Connectable.execute" title="sqlalchemy.engine.Connectable.execute"><tt class="xref py py-meth docutils literal"><span class="pre">execute()</span></tt></a>
method of a <a class="reference internal" href="connections.html#sqlalchemy.engine.Connection" title="sqlalchemy.engine.Connection"><tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt></a> or <a class="reference internal" href="connections.html#sqlalchemy.engine.Engine" title="sqlalchemy.engine.Engine"><tt class="xref py py-class docutils literal"><span class="pre">Engine</span></tt></a>, where it will be
wrapped inside of a SELECT statement first:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">print</span> <span class="n">connection</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="n">func</span><span class="o">.</span><span class="n">current_timestamp</span><span class="p">())</span><span class="o">.</span><span class="n">scalar</span><span class="p">()</span></pre></div>
</div>
<p>In a few exception cases, the <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> accessor
will redirect a name to a built-in expression such as <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.cast" title="sqlalchemy.sql.expression.cast"><tt class="xref py py-func docutils literal"><span class="pre">cast()</span></tt></a>
or <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.extract" title="sqlalchemy.sql.expression.extract"><tt class="xref py py-func docutils literal"><span class="pre">extract()</span></tt></a>, as these names have well-known meaning
but are not exactly the same as &#8220;functions&#8221; from a SQLAlchemy
perspective.</p>
<div class="versionadded">
<p><span>New in version 0.8: </span><a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> can return non-function expression
constructs for common quasi-functional names like <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.cast" title="sqlalchemy.sql.expression.cast"><tt class="xref py py-func docutils literal"><span class="pre">cast()</span></tt></a>
and <a class="reference internal" href="sqlelement.html#sqlalchemy.sql.expression.extract" title="sqlalchemy.sql.expression.extract"><tt class="xref py py-func docutils literal"><span class="pre">extract()</span></tt></a>.</p>
</div>
<p>Functions which are interpreted as &#8220;generic&#8221; functions know how to
calculate their return type automatically. For a listing of known generic
functions, see <a class="reference internal" href="#generic-functions"><em>SQL and Generic Functions</em></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>The <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> construct has only limited support for calling
standalone &#8220;stored procedures&#8221;, especially those with special
parameterization concerns.</p>
<p class="last">See the section <a class="reference internal" href="connections.html#stored-procedures"><em>Calling Stored Procedures</em></a> for details on how to use
the DBAPI-level <tt class="docutils literal"><span class="pre">callproc()</span></tt> method for fully traditional stored
procedures.</p>
</div>
</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.localtime">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">localtime</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.localtime" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.localtime.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'localtime'</em><a class="headerlink" href="#sqlalchemy.sql.functions.localtime.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.localtime.name">
<tt class="descname">name</tt><em class="property"> = 'localtime'</em><a class="headerlink" href="#sqlalchemy.sql.functions.localtime.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.localtime.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.localtime.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">DateTime</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.localtimestamp">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">localtimestamp</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.localtimestamp" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.localtimestamp.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'localtimestamp'</em><a class="headerlink" href="#sqlalchemy.sql.functions.localtimestamp.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.localtimestamp.name">
<tt class="descname">name</tt><em class="property"> = 'localtimestamp'</em><a class="headerlink" href="#sqlalchemy.sql.functions.localtimestamp.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.localtimestamp.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.localtimestamp.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">DateTime</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.max">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">max</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.max" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.ReturnTypeFromArgs" title="sqlalchemy.sql.functions.ReturnTypeFromArgs"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.ReturnTypeFromArgs</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.max.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'max'</em><a class="headerlink" href="#sqlalchemy.sql.functions.max.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.max.name">
<tt class="descname">name</tt><em class="property"> = 'max'</em><a class="headerlink" href="#sqlalchemy.sql.functions.max.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.min">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">min</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.min" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.ReturnTypeFromArgs" title="sqlalchemy.sql.functions.ReturnTypeFromArgs"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.ReturnTypeFromArgs</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.min.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'min'</em><a class="headerlink" href="#sqlalchemy.sql.functions.min.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.min.name">
<tt class="descname">name</tt><em class="property"> = 'min'</em><a class="headerlink" href="#sqlalchemy.sql.functions.min.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.next_value">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">next_value</tt><big>(</big><em>seq</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.next_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<p>Represent the &#8216;next value&#8217;, given a <a class="reference internal" href="defaults.html#sqlalchemy.schema.Sequence" title="sqlalchemy.schema.Sequence"><tt class="xref py py-class docutils literal"><span class="pre">Sequence</span></tt></a>
as its single argument.</p>
<p>Compiles into the appropriate function on each backend,
or will raise NotImplementedError if used on a backend
that does not provide support for sequences.</p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.next_value.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'next_value'</em><a class="headerlink" href="#sqlalchemy.sql.functions.next_value.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.next_value.name">
<tt class="descname">name</tt><em class="property"> = 'next_value'</em><a class="headerlink" href="#sqlalchemy.sql.functions.next_value.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.next_value.type">
<tt class="descname">type</tt><em class="property"> = Integer()</em><a class="headerlink" href="#sqlalchemy.sql.functions.next_value.type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.now">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">now</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.now" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.now.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'now'</em><a class="headerlink" href="#sqlalchemy.sql.functions.now.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.now.name">
<tt class="descname">name</tt><em class="property"> = 'now'</em><a class="headerlink" href="#sqlalchemy.sql.functions.now.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.now.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.now.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">DateTime</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.random">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">random</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.random" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.GenericFunction" title="sqlalchemy.sql.functions.GenericFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.GenericFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.random.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'random'</em><a class="headerlink" href="#sqlalchemy.sql.functions.random.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.random.name">
<tt class="descname">name</tt><em class="property"> = 'random'</em><a class="headerlink" href="#sqlalchemy.sql.functions.random.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="sqlalchemy.sql.functions.register_function">
<tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">register_function</tt><big>(</big><em>identifier</em>, <em>fn</em>, <em>package='_default'</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.register_function" title="Permalink to this definition">¶</a></dt>
<dd><p>Associate a callable with a particular func. name.</p>
<p>This is normally called by _GenericMeta, but is also
available by itself so that a non-Function construct
can be associated with the <a class="reference internal" href="#sqlalchemy.sql.functions.func" title="sqlalchemy.sql.functions.func"><tt class="xref py py-data docutils literal"><span class="pre">func</span></tt></a> accessor (i.e.
CAST, EXTRACT).</p>
</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.session_user">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">session_user</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.session_user" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.session_user.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'session_user'</em><a class="headerlink" href="#sqlalchemy.sql.functions.session_user.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.session_user.name">
<tt class="descname">name</tt><em class="property"> = 'session_user'</em><a class="headerlink" href="#sqlalchemy.sql.functions.session_user.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.session_user.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.session_user.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">String</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.sum">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">sum</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.sum" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.ReturnTypeFromArgs" title="sqlalchemy.sql.functions.ReturnTypeFromArgs"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.ReturnTypeFromArgs</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.sum.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'sum'</em><a class="headerlink" href="#sqlalchemy.sql.functions.sum.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.sum.name">
<tt class="descname">name</tt><em class="property"> = 'sum'</em><a class="headerlink" href="#sqlalchemy.sql.functions.sum.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.sysdate">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">sysdate</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.sysdate" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.sysdate.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'sysdate'</em><a class="headerlink" href="#sqlalchemy.sql.functions.sysdate.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.sysdate.name">
<tt class="descname">name</tt><em class="property"> = 'sysdate'</em><a class="headerlink" href="#sqlalchemy.sql.functions.sysdate.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.sysdate.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.sysdate.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">DateTime</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.sql.functions.user">
<em class="property">class </em><tt class="descclassname">sqlalchemy.sql.functions.</tt><tt class="descname">user</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.sql.functions.user" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.sql.functions.AnsiFunction" title="sqlalchemy.sql.functions.AnsiFunction"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.functions.AnsiFunction</span></tt></a></p>
<dl class="attribute">
<dt id="sqlalchemy.sql.functions.user.identifier">
<tt class="descname">identifier</tt><em class="property"> = 'user'</em><a class="headerlink" href="#sqlalchemy.sql.functions.user.identifier" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.user.name">
<tt class="descname">name</tt><em class="property"> = 'user'</em><a class="headerlink" href="#sqlalchemy.sql.functions.user.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.sql.functions.user.type">
<tt class="descname">type</tt><a class="headerlink" href="#sqlalchemy.sql.functions.user.type" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">String</span></tt></p>
</dd></dl>

</dd></dl>

</div>

    </div>

</div>

<div id="docs-bottom-navigation" class="docs-navigation-links">
        Previous:
        <a href="dml.html" title="previous chapter">Insert, Updates, Deletes</a>
        Next:
        <a href="types.html" title="next chapter">Column and Data Types</a>

    <div id="docs-copyright">
        &copy; <a href="../copyright.html">Copyright</a> 2007-2014, the SQLAlchemy authors and contributors.
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2b1.
    </div>
</div>

</div>

        
    </body>
</html>