summaryrefslogtreecommitdiff
path: root/examples/postgis/postgis.py
Commit message (Collapse)AuthorAgeFilesLines
* New ORM Query Guide featuring DML supportMike Bayer2022-09-251-341/+0
| | | | | | | | | | | | | | | | | reviewers: these docs publish periodically at: https://docs.sqlalchemy.org/en/gerrit/4042/orm/queryguide/index.html See the "last generated" timestamp near the bottom of the page to ensure the latest version is up Change includes some other adjustments: * small typing fixes for end-user benefit * removal of a bunch of old examples for patterns that nobody uses or aren't really what we promote now * modernization of some examples, including inheritance Change-Id: I9929daab7797be9515f71c888b28af1209e789ff
* Remove object in class definitionFederico Caselli2021-11-221-1/+1
| | | | | References: #4600 Change-Id: I2a62ddfe00bc562720f0eae700a497495d7a987a
* De-emphasize notion of "default driver" (DBAPI)Gord Thompson2021-11-091-1/+1
| | | | | | | | | | | Fixes: #6960 Even though a default driver still exists for each dialect, remove most usages of `dialect://` to encourage users to explicitly specify `dialect+driver://` Change-Id: I0ad42167582df509138fca64996bbb53e379b1af
* Update select usage to use the new 1.4 formatFederico Caselli2020-09-081-21/+15
| | | | | | | | | | | | | | | | This change includes mainly that the bracketed use within select() is moved to positional, and keyword arguments are removed from calls to the select() function. it does not yet fully address other issues such as keyword arguments passed to the table.select(). Additionally, allows False / None to both be considered as "disable" for all of select.correlate(), select.correlate_except(), query.correlate(), which establishes consistency with passing of ``False`` for the legact select(correlate=False) argument. Change-Id: Ie6c6e6abfbd3d75d4c8de504c0cf0159e6999108
* Post black reformattingMike Bayer2019-01-061-10/+16
| | | | | | | | | | | | | Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
* Run black -l 79 against all source filesMike Bayer2019-01-061-58/+128
| | | | | | | | | | | | | | This is a straight reformat run using black as is, with no edits applied at all. The black run will format code consistently, however in some cases that are prevalent in SQLAlchemy code it produces too-long lines. The too-long lines will be resolved in the following commit that will resolve all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
* spelling: Postgis -> PostGISVille Skyttä2016-10-081-2/+2
|
* - the raw 2to3 runMike Bayer2013-04-271-1/+1
| | | | - went through examples/ and cleaned out excess list() calls
* add a noteMike Bayer2012-08-171-0/+3
|
* - really start making postgis example slick.Mike Bayer2012-08-171-60/+62
|
* - [feature] To complement [ticket:2547], typesMike Bayer2012-08-171-18/+13
| | | | | | | | | | | | | | | | can now provide "bind expressions" and "column expressions" which allow compile-time injection of SQL expressions into statements on a per-column or per-bind level. This is to suit the use case of a type which needs to augment bind- and result- behavior at the SQL level, as opposed to in the Python level. Allows for schemes like transparent encryption/ decryption, usage of Postgis functions, etc. [ticket:1534] - update postgis example fully. - still need to repair the result map propagation here to be transparent for cases like "labeled column".
* - modernize most of the postgis example. would like to do [ticket:1534] also.Mike Bayer2012-08-161-91/+85
| | | | | - we don't have coverage for type-wide instrumentation events, the listener was broke. could break again too.
* update the postgis example to actually work, using the old way (we'll update ↵Mike Bayer2012-08-161-9/+9
| | | | shortly)
* -whitespace bonanza, contdMike Bayer2012-07-281-6/+6
|
* update for new table modelMike Bayer2011-06-061-6/+21
|
* - whitespace removal bonanzaMike Bayer2011-01-021-45/+45
|
* - mega example cleanupMike Bayer2010-01-191-36/+0
| | | | | | - added READMEs to all examples in each __init__.py and added to sphinx documentation - added versioning example - removed vertical/vertical.py, the dictlikes are more straightforward
* - pg8000 + postgresql dialects now check for float/numeric returnMike Bayer2009-11-151-1/+1
| | | | | | | | | | types to more intelligently determine float() vs. Decimal(), [ticket:1567] - since result processing is a hot issue of late, the DBAPI type returned from cursor.description is certainly useful in cases like these to determine an efficient result processor. There's likely other result processors that can make use of it. But, backwards incompat change to result_processor(). Happy major version number..
* merge 0.6 series to trunk.Mike Bayer2009-08-061-1/+1
|
* Lots of fixes to the code examples to specify imports explicitly.Michael Trier2009-03-311-7/+7
| | | | | | | Explicit imports make it easier for users to understand the examples. Additionally a lot of the examples were fixed to work with the changes in the 0.5.x code base. One small correction to the Case expression. Thanks a bunch to Adam Lowry! Fixes #717.
* - sqlalchemy.sql.expression.Function is now a publicMike Bayer2009-01-021-43/+118
| | | | | | | class. It can be subclassed to provide user-defined SQL functions in an imperative style, including with pre-established behaviors. The postgis.py example illustrates one usage of this.
* - Custom comparator classes used in conjunction withMike Bayer2009-01-021-10/+3
| | | | | | | | | | column_property(), relation() etc. can define new comparison methods on the Comparator, which will become available via __getattr__() on the InstrumentedAttribute. In the case of synonym() or comparable_property(), attributes are resolved first on the user-defined descriptor, then on the user-defined comparator.
* - added an extremely basic illustration of a PostGISMike Bayer2008-12-301-0/+230
integration to the examples folder.