summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ansisql.py
Commit message (Collapse)AuthorAgeFilesLines
...
* removed the dependency of ANSICompiler on SQLEngine. you can now make ↵Mike Bayer2006-03-041-19/+35
| | | | ANSICompilers and compile SQL with no engine at all.
* Merge indexes [1047]:[1048] into trunk (for #6)Jason Pellerin2006-02-261-2/+7
|
* merged sql_rearrangement branch , refactors sql package to work standalone withMike Bayer2006-02-251-13/+10
| | | | | clause elements including tables and columns, schema package deals with "physical" representations
* merged eager loading overhaul rev 1001:1009Mike Bayer2006-02-201-2/+2
| | | | | | | | | | | | | | | | | this includes: sql.Alias object keeps track of the immediate thing it aliased as well as the ultimate non-aliased (usually a Table) object, so that proxied columns can have a "parent" attribute some cleanup to SelectBaseMixin.order_by_clause to allow easier access, needs more cleanup engine has been making two ResultProxies all this time, added "return_raw" quickie flag to disable that some cleanup to _get_col_by_original so that it also works for oid columns, new eager load stuff more aggressively aliaseses orderby's so this was needed EagerLoader now makes "chains" of unique aliased eager loaders in all cases. no need for use_alias/selectalias anymore since it aliases every time. properly detects recursive eager loads and terminates them with a lazyloader, instead of raising an exception. totally simplified setup() and init() is more straightforward and has a single codepath now instead of two or three.
* exception package added, support throughoutMike Bayer2006-02-191-2/+0
|
* added hooks for engines to add stuff to SELECT, etc.Mike Bayer2006-02-181-8/+12
|
* added indexes to schema/ansisql/engineMike Bayer2006-02-181-2/+19
| | | | | | slightly different index syntax for mysql fixed mysql Time type to convert from a timedelta to time tweaks to date unit tests for mysql
* slight glitch when the same clause is compiled repeatedly and contains ↵Mike Bayer2006-02-121-1/+1
| | | | redundant bind parameters...this fix prevents the binds from stepping on each other....
* more hammering of defaults. ORM will properly execute defaults and ↵Mike Bayer2006-02-111-4/+3
| | | | post-fetch rows that contain passive defaults
* streamlined engine.schemagenerator and engine.schemadropper methodologyMike Bayer2006-02-111-5/+14
| | | | | | added support for creating PassiveDefault (i.e. regular DEFAULT) on table columns postgres can reflect default values via information_schema added unittests for PassiveDefault values getting created, inserted, coming back in result sets
* table supports per-engine-type options, ansisql allows enginesMike Bayer2006-02-051-1/+4
| | | | | | to add a "post table create" string mysql gets mysql_engine argument InnoDB set as default in engines test
* got oracle LIMIT/OFFSET to use row_number() syntaxMike Bayer2006-02-051-1/+3
| | | | | | | sql: ColumnClause will use the given name when proxying itself (used for the "ora_rn" label) ansisql: When adding on ORDER_BY, GROUP_BY, etc. clauses, if there is no string for the column list, then dont add the clause (this allows oracle to strip out the ORDER BY) Oracle is modifying the select statement, which is not ideal - should fix that
* added explicit bind parameters and column type maps to text typeMike Bayer2006-01-201-0/+2
| | | | | | | | | text type also parses :<string> into bind param objects bind parameters convert their incoming type using engine.type_descriptor() methods types.adapt_type() adjusted to not do extra work with incoming types, since the bind param change will cause it to be called a lot more added tests to new text type stuff, bind params, fixed some type tests added basic docs for using text with binde params
* key/value params on execute() are based off the from objects, not the select ↵Mike Bayer2006-01-081-16/+15
| | | | list
* copyright->2005,2006Mike Bayer2006-01-031-1/+1
|
* type objects pass engine around to get a hold of DBAPI type objectsMike Bayer2006-01-031-3/+3
| | | | | | added dbapi.Binary creation to base BinaryType fixed MySQL binary type adjustment to Join._match_primaries to work better with self-referential table
* postgres oids say byebye by default, putting hooks in for engines to ↵Mike Bayer2006-01-011-2/+9
| | | | determine column defaults externally to it having a 'default' property, beefed up unittests to support inserts with/without defaults (will fix oracle unit tests too)
* added a hook in for 'binary operator', so sqlite can exchangeMike Bayer2005-12-311-1/+4
| | | | '+' for '||' for a binary clause on a string
* fix to ansisql when it tries to determine param-based select clause that itsMike Bayer2005-12-311-5/+5
| | | | | only on a column-type object engine has settable 'paramstyle' attribute
* license switchMike Bayer2005-12-311-13/+2
|
* changes related to mapping against arbitrary selects, selects with labels or ↵Mike Bayer2005-12-301-0/+7
| | | | | | | | | | | | | | functions: testfunction has a more complete test (needs an assert tho); added new labels, synonymous with column key, to "select" statements that are subqueries with use_labels=False, since SQLite wants them - this also impacts the names of the columns attached to the select object in the case that the key and name dont match, since it is now the key, not the name; aliases generate random names if name is None (need some way to make them more predictable to help plan caching); select statements have a rowid column of None, since there isnt really a "rowid"...at least cant figure out what it would be yet; mapper creates an alias if given a select to map against, since Postgres wants it; mapper checks if it has pks for a given table before saving/deleting, skips it otherwise; mapper will not try to order by rowid if table doesnt have a rowid (since select statements dont have rowids...)
* reworking concept of column lists, "FromObject", "Selectable";Mike Bayer2005-12-301-20/+19
| | | | | | | | support for types to be propigated into boolean expressions; new label() function/method to make any column/literal/function/bind param into a "foo AS bar" clause, better support in ansisql for this concept; trying to get column list on a select() object to be Column and ColumnClause objects equally, working on mappers that map to those select() objects
* move execute parameter processing from sql.ClauseElement to ↵Mike Bayer2005-12-231-9/+71
| | | | | | | | | engine.execute_compiled testbase gets "assert_sql_count" method, moves execution wrapping to pre_exec to accomodate engine change move _get_colparams from Insert/Update to ansisql since it applies to compilation ansisql also insures that select list for columns is unique, helps the mapper with the "distinct" keyword docstrings/cleanup
* added "late WHERE" compilation to SELECT, adds where criterion based on ↵Mike Bayer2005-12-211-2/+15
| | | | | | extra bind parameters specified at compilation/execution time
* fix to parameter thing in insertMike Bayer2005-12-201-1/+1
| | | | added unicodetype to __all__ for types
* typemap needs lower case keys since result set metadata is not always ↵Mike Bayer2005-12-191-2/+7
| | | | case-sensitive (like in oracle)
* refactoring of execution path, defaults, and treatment of different paramstylesMike Bayer2005-12-171-44/+67
|
* factored "sequence" execution in postgres in oracle to be generalized to the ↵Mike Bayer2005-12-161-2/+30
| | | | | | | | SQLEngine, to also allow space for "defaults" that may be constants, python functions, or SQL functions/statements Sequence schema object extends from a more generic "Default" object ANSICompiled can convert positinal params back to a dictionary, but the whole issue of parameters and how the engine executes compiled objects with parameters should be revisited mysql has fixes for its "rowid_column" being hidden else it screws up some query construction, also will not use AUTOINCREMENT unless the column is Integer
* fixes to the previous checkin with distinct etcMike Bayer2005-12-081-5/+1
|
* some enhancemnets to unions, unions and selects need to be more commonly ↵Mike Bayer2005-12-081-2/+7
| | | | | | derived, also more tweaks to mapper eager query compilation involving distinct etc.
* added rudimentary support for limit and offset (with the hack version in oracle)Mike Bayer2005-12-071-1/+14
| | | | | fixed up order_by to support a list/scalar of columns or asc/desc fixed up query.py unit test
* docstrings, formatting fixesMike Bayer2005-12-041-1/+1
|
* more consistent treatment of columns, differentiation of ↵Mike Bayer2005-12-041-7/+12
| | | | | | selectable/non-selectable, docstrings
* math operatorsMike Bayer2005-12-041-8/+14
| | | | | | &|~ boolean operators added 'literal' keyword working on column clauses being more flexible
* primary_keys => primary_keyMike Bayer2005-12-041-1/+1
|
* refactorings to sql generation, unions, engine locationMike Bayer2005-12-031-2/+9
|
* migrated __ALL__ to __all__, oops, and reworked moduleMike Bayer2005-11-301-3/+3
| | | | import scheme
* added group_by, having to select. added func.foo(a, b) keyword to express ↵Mike Bayer2005-11-291-4/+17
| | | | functions within column lists and criterion lists
* some fixes to IN clauses, literal text clauses displaying text/numeric ↵Mike Bayer2005-11-271-5/+5
| | | | | | properly including longs
* mysql somewhat presentMike Bayer2005-11-271-4/+9
|
* got round trip for multiple priamry keys to work with table ↵Mike Bayer2005-11-261-3/+10
| | | | | | create/reflection (postgres, sqlite) small fix to ORM get with multiple primary keys
* fixes to "AS" on aliases, paramstyle default on ansisqlMike Bayer2005-11-211-2/+6
|
* (no commit message)Mike Bayer2005-11-051-5/+43
|
* (no commit message)Mike Bayer2005-11-051-1/+1
|
* (no commit message)Mike Bayer2005-11-041-2/+2
|
* (no commit message)Mike Bayer2005-11-011-0/+1
|
* (no commit message)Mike Bayer2005-10-291-7/+6
|
* (no commit message)Mike Bayer2005-10-271-2/+2
|
* (no commit message)Mike Bayer2005-10-231-4/+4
|
* (no commit message)Mike Bayer2005-10-221-0/+3
|