Skip to content

Commit ff285a2

Browse files
committed
working on sqlalchemy examples
1 parent e4828be commit ff285a2

File tree

112 files changed

+3655
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3655
-271
lines changed

content/pages/examples/sqlalchemy/sqlalchemy-dialects-mssql.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ slug: sqlalchemy-dialects-mssql-examples
44
sortorder: 500031000
55
toc: False
66
sidebartitle: sqlalchemy.dialects mssql
7-
meta: Python example code for the mssql function from the sqlalchemy.dialects module of the SQLAlchemy project.
7+
meta: Python example code for the mssql callable from the sqlalchemy.dialects module of the SQLAlchemy project.
88

99

10-
mssql is a function within the sqlalchemy.dialects module of the SQLAlchemy project.
10+
mssql is a callable within the sqlalchemy.dialects module of the SQLAlchemy project.
1111

1212

1313
## Example 1 from marshmallow-sqlalchemy

content/pages/examples/sqlalchemy/sqlalchemy-dialects-mysql.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ slug: sqlalchemy-dialects-mysql-examples
44
sortorder: 500031001
55
toc: False
66
sidebartitle: sqlalchemy.dialects mysql
7-
meta: Python example code for the mysql function from the sqlalchemy.dialects module of the SQLAlchemy project.
7+
meta: Python example code for the mysql callable from the sqlalchemy.dialects module of the SQLAlchemy project.
88

99

10-
mysql is a function within the sqlalchemy.dialects module of the SQLAlchemy project.
10+
mysql is a callable within the sqlalchemy.dialects module of the SQLAlchemy project.
1111

1212

1313
## Example 1 from marshmallow-sqlalchemy

content/pages/examples/sqlalchemy/sqlalchemy-dialects-oracle.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ slug: sqlalchemy-dialects-oracle-examples
44
sortorder: 500031002
55
toc: False
66
sidebartitle: sqlalchemy.dialects oracle
7-
meta: Python example code for the oracle function from the sqlalchemy.dialects module of the SQLAlchemy project.
7+
meta: Python example code for the oracle callable from the sqlalchemy.dialects module of the SQLAlchemy project.
88

99

10-
oracle is a function within the sqlalchemy.dialects module of the SQLAlchemy project.
10+
oracle is a callable within the sqlalchemy.dialects module of the SQLAlchemy project.
1111

1212

1313
## Example 1 from sqlalchemy-utils

content/pages/examples/sqlalchemy/sqlalchemy-dialects-postgresql-array.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ slug: sqlalchemy-dialects-postgresql-array-examples
44
sortorder: 500031005
55
toc: False
66
sidebartitle: sqlalchemy.dialects.postgresql ARRAY
7-
meta: Python example code for the ARRAY class from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
7+
meta: Python example code for the ARRAY constant from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
88

99

10-
ARRAY is a class within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
10+
ARRAY is a constant within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
1111

1212

1313
## Example 1 from sqlalchemy-utils

content/pages/examples/sqlalchemy/sqlalchemy-dialects-postgresql-base-pgtypecompiler.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: sqlalchemy.dialects.postgresql.base PGTypeCompiler code examples
22
category: page
33
slug: sqlalchemy-dialects-postgresql-base-pgtypecompiler-examples
4-
sortorder: 500031012
4+
sortorder: 500031013
55
toc: False
66
sidebartitle: sqlalchemy.dialects.postgresql.base PGTypeCompiler
77
meta: Python example code for the PGTypeCompiler class from the sqlalchemy.dialects.postgresql.base module of the SQLAlchemy project.

content/pages/examples/sqlalchemy/sqlalchemy-dialects-postgresql-bigint.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ slug: sqlalchemy-dialects-postgresql-bigint-examples
44
sortorder: 500031006
55
toc: False
66
sidebartitle: sqlalchemy.dialects.postgresql BIGINT
7-
meta: Python example code for the BIGINT class from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
7+
meta: Python example code for the BIGINT constant from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
88

99

10-
BIGINT is a class within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
10+
BIGINT is a constant within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
1111

1212

1313
## Example 1 from alembic

content/pages/examples/sqlalchemy/sqlalchemy-dialects-postgresql-bit.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ slug: sqlalchemy-dialects-postgresql-bit-examples
44
sortorder: 500031007
55
toc: False
66
sidebartitle: sqlalchemy.dialects.postgresql BIT
7-
meta: Python example code for the BIT class from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
7+
meta: Python example code for the BIT constant from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
88

99

10-
BIT is a class within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
10+
BIT is a constant within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
1111

1212

1313
## Example 1 from sqlalchemy-utils
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
title: sqlalchemy.dialects.postgresql DOUBLE_PRECISION code examples
2+
category: page
3+
slug: sqlalchemy-dialects-postgresql-double-precision-examples
4+
sortorder: 500031008
5+
toc: False
6+
sidebartitle: sqlalchemy.dialects.postgresql DOUBLE_PRECISION
7+
meta: Python example code for the DOUBLE_PRECISION constant from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
8+
9+
10+
DOUBLE_PRECISION is a constant within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
11+
12+
13+
## Example 1 from GeoAlchemy2
14+
[GeoAlchemy2](https://github.com/geoalchemy/geoalchemy2)
15+
([project documentation](https://geoalchemy-2.readthedocs.io/en/latest/)
16+
and
17+
[PyPI package information](https://pypi.org/project/GeoAlchemy2/))
18+
extends [SQLAlchemy](/sqlalchemy.html) with new data types for working
19+
with geospatial databases, particularly [PostGIS](http://postgis.net/),
20+
which is a spatial database extender for [PostgreSQL](/postgresql.html).
21+
The project is provided as open source under the
22+
[MIT license](https://github.com/geoalchemy/geoalchemy2/blob/master/COPYING.rst).
23+
24+
[**GeoAlchemy2 / geoalchemy2 / comparator.py**](https://github.com/geoalchemy/geoalchemy2/blob/master/geoalchemy2/./comparator.py)
25+
26+
```python
27+
# comparator.py
28+
29+
from sqlalchemy import types as sqltypes
30+
from sqlalchemy.types import UserDefinedType
31+
~~from sqlalchemy.dialects.postgresql import DOUBLE_PRECISION
32+
from sqlalchemy.sql import operators
33+
try:
34+
from sqlalchemy.sql.functions import _FunctionGenerator
35+
except ImportError: # SQLA < 0.9 # pragma: no cover
36+
from sqlalchemy.sql.expression import _FunctionGenerator
37+
38+
39+
INTERSECTS = operators.custom_op('&&')
40+
OVERLAPS_OR_TO_LEFT = operators.custom_op('&<')
41+
OVERLAPS_OR_TO_RIGHT = operators.custom_op('&>')
42+
OVERLAPS_OR_BELOW = operators.custom_op('&<|')
43+
TO_LEFT = operators.custom_op('<<')
44+
BELOW = operators.custom_op('<<|')
45+
TO_RIGHT = operators.custom_op('>>')
46+
CONTAINED = operators.custom_op('@')
47+
OVERLAPS_OR_ABOVE = operators.custom_op('|&>')
48+
ABOVE = operators.custom_op('|>>')
49+
CONTAINS = operators.custom_op('-')
50+
SAME = operators.custom_op('-=')
51+
DISTANCE_CENTROID = operators.custom_op('<->')
52+
DISTANCE_BOX = operators.custom_op('<#>')
53+
54+
55+
class BaseComparator(UserDefinedType.Comparator):
56+
57+
58+
## ... source file continues with no further DOUBLE_PRECISION examples...
59+
60+
```
61+

content/pages/examples/sqlalchemy/sqlalchemy-dialects-postgresql-excludeconstraint.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: sqlalchemy.dialects.postgresql ExcludeConstraint code examples
22
category: page
33
slug: sqlalchemy-dialects-postgresql-excludeconstraint-examples
4-
sortorder: 500031008
4+
sortorder: 500031009
55
toc: False
66
sidebartitle: sqlalchemy.dialects.postgresql ExcludeConstraint
77
meta: Python example code for the ExcludeConstraint class from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.

content/pages/examples/sqlalchemy/sqlalchemy-dialects-postgresql-integer.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
title: sqlalchemy.dialects.postgresql INTEGER code examples
22
category: page
33
slug: sqlalchemy-dialects-postgresql-integer-examples
4-
sortorder: 500031009
4+
sortorder: 500031010
55
toc: False
66
sidebartitle: sqlalchemy.dialects.postgresql INTEGER
7-
meta: Python example code for the INTEGER class from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
7+
meta: Python example code for the INTEGER constant from the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
88

99

10-
INTEGER is a class within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
10+
INTEGER is a constant within the sqlalchemy.dialects.postgresql module of the SQLAlchemy project.
1111

1212

1313
## Example 1 from alembic

0 commit comments

Comments
 (0)