Commit Graph

5242 Commits

Author SHA1 Message Date
Mike Bayer 01f9705a80 test for inheritance, tests objectstore post_exec works fully 2006-01-26 00:28:10 +00:00
Robert Leftwich d986449ee4 Added column accessor to RowProxy, tests and note in documentation for same. 2006-01-25 01:07:26 +00:00
Mike Bayer 841fc3b72f postgres checks for string/int port ID, converts to int for pg2 and string for pg1 2006-01-22 23:18:22 +00:00
Robert Leftwich 2d31b8fd60 order_by and group_by being output in wrong order. Added tests for same. 2006-01-22 12:08:10 +00:00
Mike Bayer 2808d04dd8 added explicit bind parameters and column type maps to text type
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
2006-01-20 00:42:07 +00:00
Mike Bayer c9e7e698e6 implemented better hash_key on select allowing proper comparisons, implemented
hash_key on all clause objects
added hash_key test to select
util gets extra threadlocal functions and the recursionstack object
2006-01-19 01:43:26 +00:00
Robert Leftwich c4085b0fbf Fixed problem in Column.copy(), _make_proxy() with nullable and hidden not being reflected into new Column. Added test for same. Removed reference to non-existant columns test from list of tests in alltests. 2006-01-16 06:22:52 +00:00
Mike Bayer 1117b0bf81 mysql table introspection uses 'describe' to work with 3/4/5
no foreign key introspection available, sorry !
2006-01-13 01:23:55 +00:00
Mike Bayer 95a05e5cd9 tests mapper column/property check 2006-01-13 01:13:15 +00:00
Mike Bayer 37c762622c added some __repr__ functionality 2006-01-08 19:02:26 +00:00
Mike Bayer 23b7448075 sqlite/postgres reflection will properly add foreign keys
added append_item() method to column to work similarly to table.append_item(), used to
append foreign keys to the column (required in mysql)
appending new foreign keys will properly replace the old one, so explicitly appending
foreign keys to tables will replace those loaded via table reflection (instead of doubling them up)
2006-01-08 18:11:52 +00:00
Mike Bayer 4c50fd22ed added count func to mapper 2006-01-08 07:24:33 +00:00
Mike Bayer e8a90dc0a1 small adjust after mapper/sql overhaul 2006-01-08 01:35:29 +00:00
Mike Bayer 0e8fc7abc2 unit tests to test column/pk/fk exports on relational objects 2006-01-08 01:30:03 +00:00
Mike Bayer 64147f5743 moved 'float' test into types test, renamed typetest to overrride test 2006-01-08 01:28:49 +00:00
Mike Bayer 8efb6a418b testing backref/lazyload uses mapper.get() 2006-01-05 05:47:33 +00:00
Mike Bayer d6174283bc added binary unit tests
moved datetest to the types module
2006-01-03 00:36:45 +00:00
Mike Bayer d1f05cbaa3 broke apart deafult ordering into oid or primary key. a DB that has no oids will have a None oid_column attribute. 2006-01-02 05:40:37 +00:00
Mike Bayer 6980730e7d rowid->oid 2006-01-02 05:22:00 +00:00
Mike Bayer abf2895a78 changed mysql TIMESTAMP->DATETIME
fixed up date unit test
RowProxy __iter__ properly routes columns through type processing
2006-01-02 04:06:57 +00:00
Mike Bayer 705f308452 rowid_column becomes more like the "order by column". 'default_ordering' flag sent to create_engine enables whether or not the rowid_column on a Table will be None or not. mappers/relations will by default use the rowid_column for ordering if its not None, else theres no default ordering.
still should better define 'default_ordering'/'rowid_column' relationship since its a little kludgy.
2006-01-01 21:08:22 +00:00
Mike Bayer 943bb0b0e0 postgres oids say byebye by default, putting hooks in for engines to 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) 2006-01-01 20:30:53 +00:00
Mike Bayer 7553b79721 license switch 2005-12-31 03:23:12 +00:00
Mike Bayer 5ceef4809d changes related to mapping against arbitrary selects, selects with labels or 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...)
2005-12-30 05:58:45 +00:00
Mike Bayer ee40adf5f8 reworking concept of column lists, "FromObject", "Selectable";
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
2005-12-30 00:27:46 +00:00
Mike Bayer eb554a0444 adjustments for oracle sequences 2005-12-30 00:24:03 +00:00
Mike Bayer 4372eafaab catching up oracle to current, some tweaks to unittests to work better with oracle,
allow different ordering of expected statements.
unittests still dont work completely with oracle due to sequence columns in INSERT statements
2005-12-30 00:23:01 +00:00
Mike Bayer 9b93554cc0 updates for assignmapper, inherit_condition not required 2005-12-29 00:42:47 +00:00
Mike Bayer 237bf917f7 the 'column' function is optional to point a property to a column when constructing a mapper
can also be specified as a list to indicate overlap
mapper columns come from its table, no need to add from given columns
2005-12-24 15:33:47 +00:00
Mike Bayer a7df1ed619 ColumnProperty -> column 2005-12-24 15:23:14 +00:00
Mike Bayer 79843330ae mapper, when updating, only SET's those columns that have changed.
this also allows "deferred" column properties to remain untouched by a save operation
if they werent affected.
2005-12-23 05:19:48 +00:00
Mike Bayer e97211413e added defer and undefer mapper options 2005-12-23 04:44:44 +00:00
Mike Bayer 8111fda29f refactor/cleanup to mapper options methodology to allow for incoming defer/undefer options
mapper/relations are stricter about class attributes and primary mapper - is_primary flag
on relations fixed (wasnt working before). new primary mappers clear off old class attributes,
secondary mappers insure that their property was set up by the primary; otherwise secondary
mappers can add behavior to properties that are unmanaged by the primary mapper
added "group" option to deferred loaders so a group of properties can be loaded at once
mapper adds the "oid" column to the select list if "distinct" is set to true and its
using the default "order by oid" ordering (mysql benefits from ansisql fix to only print out unique
columns in the select list since its oid is the same as the pk column)
fixed unittests to comply with stricter primary mapper rules
2005-12-23 01:49:44 +00:00
Mike Bayer dbd407d62a move execute parameter processing from sql.ClauseElement to 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
2005-12-23 01:37:10 +00:00
Mike Bayer d22f5edcae deferred property, checks for NULL primary key components and returns None 2005-12-22 03:25:43 +00:00
Mike Bayer 9ebac6151a added 'deferred' keyword, allowing deferred loading of a particular column 2005-12-21 03:44:46 +00:00
Mike Bayer af28188808 added "late WHERE" compilation to SELECT, adds where criterion based on extra bind parameters specified
at compilation/execution time
2005-12-21 02:36:54 +00:00
Mike Bayer d66fed58cd fix to engine echo, random rundocs 2005-12-20 05:25:30 +00:00
Mike Bayer 3ccf340807 in_ clause uses bind params, for typing etc. 2005-12-20 05:24:51 +00:00
Mike Bayer 3e4b0d17a9 fix to oracle function select, users table in test should be non-sequence 2005-12-17 19:35:00 +00:00
Mike Bayer d51d1ccaac put an assertion in default test 2005-12-17 18:50:06 +00:00
Mike Bayer 40964f68a1 refactoring of execution path, defaults, and treatment of different paramstyles 2005-12-17 02:49:47 +00:00
Mike Bayer c46afcd8b6 manytomany test shows that mysql needs column lengths on string to be used as a primary key
testbase simplified slightly, allowed by reorganiztion of engine's execution of compiled objects
2005-12-16 07:19:29 +00:00
Mike Bayer c649d2f03f small tweak to HistoryList to properly report "delete" success, new unit test added to manytomany 2005-12-15 05:09:44 +00:00
Mike Bayer b7e5d114f5 added select_by, get_by, magic methods 2005-12-14 05:45:49 +00:00
Mike Bayer 3cd30fdc70 echo can now be False, True or 'debug'. result sets are printed only if echo is 'debug'. 2005-12-12 01:56:42 +00:00
Mike Bayer 83bc03b6d9 more combinations 2005-12-12 01:46:39 +00:00
Mike Bayer 8ed282c3c2 added 'order_by' property to mapper constructor
added 'no_sort' property to mapper _compile method to disable all ordering
mapper _compile will not use its internal order_by if the given statement has an orderby
lazyloader order_by used standalone when loading via mapper
2005-12-12 01:44:58 +00:00
Mike Bayer 69ad2955bd build in 'backref' property argument 2005-12-09 05:08:51 +00:00
Mike Bayer e2c4d1cc58 more grueling unit tests involving limit, offset and distinct (and unions) 2005-12-08 03:02:33 +00:00