summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/sqlite.py
Commit message (Collapse)AuthorAgeFilesLines
...
* For sqlite NUMERIC, send Decimal bind values as strings instead of ↵Jason Kirtland2007-08-221-0/+9
| | | | converting to floats.
* - method call removalMike Bayer2007-08-201-6/+2
|
* 1. Module layout. sql.py and related move into a package called "sql".Mike Bayer2007-08-181-23/+18
| | | | | | | | | | | | 2. compiler names changed to be less verbose, unused classes removed. 3. Methods on Dialect which return compilers, schema generators, identifier preparers have changed to direct class references, typically on the Dialect class itself or optionally as attributes on an individual Dialect instance if conditional behavior is needed. This takes away the need for Dialect subclasses to know how to instantiate these objects, and also reduces method overhead by one call for each one. 4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now). The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument. 5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
* added support for string date passthru in sqliteMike Bayer2007-08-161-1/+4
|
* - merged "fasttypes" branch. this branch changes the signatureMike Bayer2007-08-141-31/+43
| | | | | | | | | | | | | of convert_bind_param() and convert_result_value() to callable-returning bind_processor() and result_processor() methods. if no callable is returned, no pre/post processing function is called. - hooks added throughout base/sql/defaults to optimize the calling of bind param/result processors so that method call overhead is minimized. special cases added for executemany() scenarios such that unneeded "last row id" logic doesn't kick in, parameters aren't excessively traversed. - new performance tests show a combined mass-insert/mass-select test as having 68% fewer function calls than the same test run against 0.3. - general performance improvement of result set iteration is around 10-20%.
* auto-commit after LOAD DATA INFILE for mysqlJason Kirtland2007-08-121-1/+3
| | | | caught a couple more uncompiled regexps
* switch (simple) occurences of 'if len(x)' to 'if x': find . -name '*.py' ↵Jonathan Ellis2007-08-031-1/+1
| | | | |xargs perl -pi.bak -e 's/if len\((\S+)\):/if $1:/' && find . -name '*.bak' |xargs rm
* - Dialects can be queried for the server version (sqlite and mysql only with ↵Jason Kirtland2007-08-031-0/+3
| | | | | | | | | | | | | | this commit) - Mark everything in a test suite as failed when setUpAll fails. - Added test coverage for Unicode table names in metadata.reflect() - @testing.exclude() filters out tests by server version - Applied exclude to the test suite, MySQL 4.1 passes again (no XA or SAVEPOINT) - Removed MySQL charset-setting pool hook- charset=utf8&use_unicode=0 works just as well. (Am I nuts? I'd swear this didn't work before.) - Finally migrated some old MySQL-tests into the dialect test module - Corrected 'commit' and 'rollback' logic (and comment) for ancient MySQL versions lacking transactions entirely - Deprecated the MySQL get_version_info in favor of server_version_info - Added a big hunk-o-doc for MySQL.
* - removed import of old sqlite module [ticket:654]Mike Bayer2007-07-291-6/+1
| | | | | - removed sqlite version warning, all tests pass 100% with py2.5's older sqlite lib - fixed dynamic test for py2.5
* engine.table_names()Jonathan Ellis2007-07-291-0/+4
| | | | tested vs sqlite and pg. mssql should also be ok (uses ischema like pg.) others are best-guess based on has_table code.
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-19/+22
| | | | maintenance branch in branches/rel_0_3.
* Better quoting of identifiers when manipulating schemasJason Kirtland2007-07-191-1/+2
| | | | Merged from r2981
* Properly escape table names when reflecting for mssql and sqlite [ticket:653]Paul Johnston2007-07-171-3/+3
|
* rearrange sqlite dialect initialization to be able to warn about pysqlite1 ↵Ants Aasma2007-07-141-1/+1
| | | | being too old. fixes #654
* - result.last_inserted_ids() should return a list that is identicallyMike Bayer2007-06-171-1/+3
| | | | | | sized to the primary key constraint of the table. values that were "passively" created and not available via cursor.lastrowid will be None. - sqlite: string PK column inserts dont get overwritten with OID [ticket:603]
* - sqlite better handles datetime/date/time objects mixed and matchedMike Bayer2007-06-171-6/+15
| | | | with various Date/Time/DateTime columns
* include current versions in warning messages. simplify sqlite_ver test; if ↵Jonathan Ellis2007-06-011-3/+3
| | | | a tuple is less than 2,1,3 it is also less than 2,2
* - converted logger.warn() to warnings.warn()Mike Bayer2007-04-211-2/+9
| | | | - implemented #302
* - Promoted mysql's dburl query string helper to util + fixedJason Kirtland2007-04-191-1/+10
| | | | | | - Coercing sqlite connect args provided in query string to their expected type (e.g. 'timeout' as float, fixes #544) - Coerce mysql's client_flag to int too
* - the dialects within sqlalchemy.databases become a setuptoolsMike Bayer2007-04-171-13/+15
| | | | | | entry points. loading the built-in database dialects works the same as always, but if none found will fall back to trying pkg_resources to load an external module [ticket:521]
* - got unicode schemas to work with postgresMike Bayer2007-04-151-0/+3
| | | | | - unicode schema with mysql slightly improved, still cant do has_table - got reflection of unicode schemas working with sqlite, pg, mysql
* - some cleanup of reflection unit testsMike Bayer2007-04-041-3/+0
| | | | | | - removed silly behavior where sqlite would reflect UNIQUE indexes as part of the primary key (?!) - added __contains__ support to ColumnCollection; contains_column() method should be removed
* - merged the "execcontext" branch, refactors engine/dialect codepathsMike Bayer2007-04-021-33/+27
| | | | | | | | | | | | | | | | | | | | - much more functionality moved into ExecutionContext, which impacted the API used by dialects to some degree - ResultProxy and subclasses now designed sanely - merged patch for #522, Unicode subclasses String directly, MSNVarchar implements for MS-SQL, removed MSUnicode. - String moves its "VARCHAR"/"TEXT" switchy thing into "get_search_list()" function, which VARCHAR and CHAR can override to not return TEXT in any case (didnt do the latter yet) - implements server side cursors for postgres, unit tests, #514 - includes overhaul of dbapi import strategy #480, all dbapi importing happens in dialect method "dbapi()", is only called inside of create_engine() for default and threadlocal strategies. Dialect subclasses have a datamember "dbapi" referencing the loaded module which may be None. - added "mock" engine strategy, doesnt require DBAPI module and gives you a "Connecition" which just sends all executes to a callable. can be used to create string output of create_all()/drop_all().
* migrated (most) docstrings to pep-257 format, docstring generator using ↵Mike Bayer2007-02-251-16/+41
| | | | | | straight <pre> + trim() func for now. applies most of [ticket:214], compliemnts of Lele Gaifax
* - added "schema" argument to all has_table() calls, only supported so far by PGMike Bayer2007-02-041-1/+1
| | | | - added basic unit test for PG reflection of tables in an alternate schema
* oracle can conditionally decide if it wants to say "use rowid" in a select ↵Mike Bayer2007-01-241-1/+1
| | | | | | | statement. needs to be tweaked vs. when ROW NUMBER OVER ORDER BY is being used, but currently fixes [ticket:436]
* tweak to support reflecting eqlite columns that didnt specify a typeMike Bayer2007-01-061-2/+6
|
* copyright updateMike Bayer2007-01-051-1/+1
|
* - support for None as precision/length in numeric types for postgres, ↵Mike Bayer2006-12-091-1/+4
| | | | | | sqlite, mysql - postgres reflection fixes: [ticket:349] [ticket:382]
* removed useless lineMike Bayer2006-12-031-1/+0
|
* further fixes to sqlite booleans, weren't working as defaultsMike Bayer2006-10-291-0/+2
|
* fix for sqlite refection of names with weird quotes around them in the DDL ↵Mike Bayer2006-10-191-1/+4
| | | | which seem to hang around
* - ForeignKey(Constraint) supports "use_alter=True", to create/drop a foreign keyMike Bayer2006-10-151-0/+9
| | | | via ALTER. this allows circular foreign key relationships to be set up.
* - a fair amount of cleanup to the schema package, removal of ambiguousMike Bayer2006-10-141-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods, methods that are no longer needed. slightly more constrained useage, greater emphasis on explicitness. - table_iterator signature fixup, includes fix for [ticket:288] - the "primary_key" attribute of Table and other selectables becomes a setlike ColumnCollection object; is no longer ordered or numerically indexed. a comparison clause between two pks that are derived from the same underlying tables (i.e. such as two Alias objects) can be generated via table1.primary_key==table2.primary_key - append_item() methods removed from Table and Column; preferably construct Table/Column/related objects inline, but if needed use append_column(), append_foreign_key(), append_constraint(), etc. - table.create() no longer returns the Table object, instead has no return value. the usual case is that tables are created via metadata, which is preferable since it will handle table dependencies. - added UniqueConstraint (goes at Table level), CheckConstraint (goes at Table or Column level) fixes [ticket:217] - index=False/unique=True on Column now creates a UniqueConstraint, index=True/unique=False creates a plain Index, index=True/unique=True on Column creates a unique Index. 'index' and 'unique' keyword arguments to column are now boolean only; for explcit names and groupings of indexes or unique constraints, use the UniqueConstraint/Index constructs explicitly. - relationship of Metadata/Table/SchemaGenerator/Dropper has been improved so that the schemavisitor receives the metadata object for greater control over groupings of creates/drops. - added "use_alter" argument to ForeignKey, ForeignKeyConstraint, but it doesnt do anything yet. will utilize new generator/dropper behavior to implement.
* some cleanup submitted by Lele GalifaxMike Bayer2006-10-131-3/+0
|
* - fixes to Date/Time (SLDate/SLTime) types; works as good as postgresMike Bayer2006-10-121-4/+5
| | | | now [ticket:335]
* - added test suite to test improved from_obj/join behavior with ↵Mike Bayer2006-09-281-0/+2
| | | | | | | | Query/eagerloading/SelectResults - EagerLoader looks more carefully for the correct Table/Join/FromClause to bind its outer join onto - sqlite boolean datatype converts bind params from python booleans to integer - took out assertion raise from 'name' property of CompoundSelect
* sqlite doesnt support FOR UPDATEMike Bayer2006-09-111-0/+4
|
* - import of py2.5s sqlite3 [ticket:293]Mike Bayer2006-09-041-4/+7
|
* sqlite dialects can be created without pysqlite installedMike Bayer2006-08-211-3/+1
|
* - postgres reflection moved to use pg_schema tables, can be overriddenMike Bayer2006-08-211-3/+3
| | | | | | | | with use_information_schema=True argument to create_engine [ticket:60], [ticket:71] - added natural_case argument to Table, Column, semi-experimental flag for use with table reflection to help with quoting rules [ticket:155]
* some fixes to sqlite datetime organization, was improperly reflectingMike Bayer2006-08-121-5/+7
| | | | the "date" type as a "datetime"
* quoting facilities set up so that database-specific quoting can beMike Bayer2006-08-121-3/+9
| | | | | | | turned on for individual table, schema, and column identifiers when used in all queries/creates/drops. Enabled via "quote=True" in Table or Column, as well as "quote_schema=True" in Table. Thanks to Aaron Spike for his excellent efforts. [ticket:155]
* oops: committed the rest of [changeset:1759], removed print in sqlite + ↵Mike Bayer2006-08-031-1/+1
| | | | restored error check in Join
* - better check for ambiguous join conditions in sql.Join; propigates to aMike Bayer2006-08-031-3/+17
| | | | | | | better error message in PropertyLoader (i.e. relation()/backref()) for when the join condition can't be reasonably determined. - sqlite creates ForeignKeyConstraint objects properly upon table reflection.
* fix for when default is zeroJonathan Ellis2006-07-311-1/+1
|
* PassiveDefault('?') for autoloaded sqlite defaultsJonathan Ellis2006-07-271-3/+7
| | | | (no complaints on-list so I'm checking this in... go ahead and revert if I'm stepping on any toes here, Mike)
* [ticket:256] propigating url.query arguments to connect() function for all db'sMike Bayer2006-07-251-1/+1
|
* overhaul to schema, addition of ForeignKeyConstraint/Mike Bayer2006-07-141-28/+11
| | | | | | | | PrimaryKeyConstraint objects (also UniqueConstraint not completed yet). table creation and reflection modified to be more oriented towards these new table-level objects. reflection for sqlite/postgres/mysql supports composite foreign keys; oracle/mssql/firebird not converted yet.
* fixed up boolean datatype for sqlite, mysql, ms-sqlMike Bayer2006-07-131-0/+4
|