Commit Graph

718 Commits

Author SHA1 Message Date
niphlod 7d59bcab72 first steps to a cleaner DAL and rname integration 2014-01-13 23:35:42 +01:00
Alan Etkin f04cc69abe Remove illegal nosql command implementations 2014-01-11 09:51:10 -03:00
mdipierro c93ce5dbab reverted latest patch 2014-01-10 08:28:09 -06:00
Alan Etkin 20e2d9aa57 Added _insert for App Engine 2014-01-09 09:41:27 -03:00
Fran Boon d5f04551f2 Fix for orderby_on_limitby with Table aliases 2014-01-07 22:36:22 +00:00
mdipierro 7787317d06 fixed a problem with python version compatibility, thanks Anthony 2014-01-05 21:37:31 -06:00
mdipierro 76b3906ade fixed error message, thanks Anthony 2014-01-04 20:19:20 -06:00
mdipierro efcf8c0c95 fixed problem about excutesql(as_dict=True) and ambiguous column names, thanks Anthony 2014-01-03 22:00:02 -06:00
mdipierro 12bb4a8d93 removed 'if count > limits[1]-limits[0]:' in dal.py 2014-01-03 21:31:06 -06:00
mdipierro a4416bd11f fixed issue 1819:Datastore reconnect problem, thanks Alan 2013-12-17 16:40:44 -06:00
mdipierro 53a0718a78 fixed problem with lack of connector in NoSQL 2013-12-15 13:31:56 -06:00
niphlod 09c0069b43 fix mssql quoting issue, disabled some tests
Tests now pass on mssql. I think we need to agree on what's going on
with DAL, or we risk shipping a module with lots of changes that are
breaking backward compatibility. I'll start a thread on
web2py-developers
2013-12-15 15:06:42 +01:00
mdipierro 4aabf3c69c fixed typo, thanks User 2013-12-11 20:36:39 -06:00
mdipierro 69f9cf28df fixed db(((db.table1.field1 + db.table1.field2)>4)).select(), thanks Boris 2013-12-11 20:33:24 -06:00
mdipierro 15dd46a91a reverted grouping of joined tables 2013-12-09 21:28:26 -06:00
mdipierro bbbee21b0d DAL(...,adapter_args=dict(engine='MyISAM')) 2013-12-09 18:56:05 -06:00
mdipierro cda7c66637 fixed bug in last commit, thanks User 2013-12-09 17:55:53 -06:00
mdipierro 53122bfa9f possible implementation of st_dwithin, thanks User 2013-12-09 17:06:25 -06:00
mdipierro 85058bd847 fixed this issue http://stackoverflow.com/questions/20363043/web2py-dal-left-join-and-operator-precedence 2013-12-08 09:33:30 -06:00
mdipierro 46d630a2c0 ST_DWithin for postgres 2013-12-08 08:26:00 -06:00
mdipierro 1715b0c378 fixed 1807:Preserve quote template for NoSQLAdapter and subclasses, thanks Alan and Michele 2013-12-07 10:20:29 -06:00
mdipierro 3599863304 fixed 1801:error in DAL using MongoDB with 'list:reference <table>', thanks Alan 2013-12-07 10:18:33 -06:00
Michele Comitini 14bcad629e quoting of tablenames and field names
fix for wrong sequence name quoting

fix for wrong sequence name quoting 2

reverted test to quoted rname

rname passed asis. freedom in table names and field names. Case sensitivity in field and table names

removed test of allowed char sequence in table and field names, there is no limit anymore

fixed some troubles with postgresql drop(). Better Row.__getitem__(): should not be much slower.  Added a ignore_field_case parameter to allow Field('F')!=Field('f') on databases supporting case sesitivity.

different mysql drivers handled in quoting test.

improved handling of foreing keys

fix with quoted names in SQLTABLE.  fix for ORDER BY

handle references on non "id" fields

check reference expression against table list first
2013-12-03 12:29:30 +01:00
mdipierro 16f9222847 Merge pull request #316 from anssih/fix/ndb-lists
Fix list types in GAE NDB after entity write
2013-12-02 19:41:26 -08:00
Anssi Hannula b7e7c8caf2 Fix list types in GAE NDB after entity write
As per
http://code.google.com/p/appengine-ndb-experiment/issues/detail?id=208
("List items from repeated StringProperty get mutated to _BaseValue on
put") it seems to be expected behavior that lists in NDB models get
mutated to _BaseValue lists after .put() is called.

In web2py this corresponds to:
------------
db.define_table('listintegertest',
	Field('dummy', 'boolean'),
	Field('integerlist', 'list:integer'),
	Field('stringlist', 'list:string'),
)

iidee = db.listintegertest.insert(
	integerlist=[1,2,3,4],
	stringlist=["1","2","3","4"]
)
row = db.listintegertest(iidee)
db.listintegertest[row.id] = dict(dummy=True)

print "type is %s" % (type(row.integerlist[0]))
print "type is %s" % (type(row.stringlist[0]))
------------

The output of the above is currently:
type is <class 'google.appengine.ext.ndb.model._BaseValue'>
type is <class 'google.appengine.ext.ndb.model._BaseValue'>
while this is expected:
type is <type 'int'>
type is <type 'unicode'>

The workaround is to copy the list from the NDB model instead of
relying on it not being changed afterwards.

list:reference is not affected since parse_list_references() already
recreates the list in NoSQLAdapter case.
2013-12-02 23:27:21 +02:00
mdipierro 55cbc1830a fixed issue 1795:MongoDB: DAL instantiation dict definition error, thanks Alan 2013-12-02 02:07:17 -06:00
Anssi Hannula fcd9e0d5c6 Fix references with GAE in NDB mode
For reference types the IntegerProperty class (no matter if NDB or
not) constructor is passed the referenced table name as the first
parameter.

For non-NDB, the first parameter is 'verbose_name'. For NDB, the first
parameter is 'name'.

In NDB mode this causes the property to have a wrong identity and
therefore references fail to work properly.

The verbose_name set in non-NDB mode is relatively harmless in
comparison, but seems to be wrong as well as it does not really make
sense.

Do not pass referenced table name to the IntegerProperty constructor in
either case.
2013-12-01 23:36:25 +02:00
ilvalle 3592dba7f5 fix issue-1789 2013-11-25 09:49:43 +01:00
mdipierro 5f1caf668b colnames in grid, thanks Niphlod, Arnon, and Paolo 2013-11-22 08:38:12 -06:00
mdipierro f6318ae86c Merge pull request #301 from gi0baro/issue1772
Issue #1772: let the user choose uploads_in_blob with mongodb
2013-11-20 07:17:49 -08:00
Massimo e57907de35 do not truncate on delete 2013-11-19 17:38:13 -06:00
Massimo df2f9e7119 NDB accepts set, list and tuple, thanks Quint 2013-11-19 17:07:19 -06:00
mdipierro 6868ddeed5 fixed 1779:Query class __str__ method should cast non string values, thanks Alan 2013-11-18 15:41:32 -06:00
gi0baro 9028ec9857 Issue #1772: let the user choose uploads_in_blob with mongodb 2013-11-18 01:02:43 +01:00
mdipierro 8696a01eda some GAE optimization, thanks Quint 2013-11-17 13:36:35 -06:00
mdipierro f8f91c6a6a experiment with mongodb and belongs 2013-11-17 12:03:20 -06:00
mdipierro 97739e9e8a in mongodb uploads_in_blob = False, because of https://code.google.com/p/web2py/issues/detail?id=1772, thanks Alan 2013-11-17 09:32:01 -06:00
mdipierro 16b68572cd attempt to support GAE IN operator, thanks Quint 2013-11-17 09:28:46 -06:00
mdipierro d6e63b4d7c simpled int to hex conversion of mongo id, thanks Alan 2013-11-17 09:21:16 -06:00
Alan Etkin bdc214f45b MongoDB: fixed object_id function (hex values) 2013-11-16 17:16:59 -03:00
mdipierro a91570768e fixed typo 2013-11-16 11:52:18 -06:00
mdipierro d35321c6c6 improvements to GoogleAdapter, thanks Quint 2013-11-16 04:10:18 -06:00
mdipierro e482cba237 minor dal rewrite in real_referenced 2013-11-16 03:54:30 -06:00
mdipierro c7cf13f8ea minor rewrite of mongoDB adapter 2013-11-16 03:39:39 -06:00
mdipierro e0329ce59a fixed 1771:MongoDBAdapter ILIKE and widget.autocomplete, thanks Francisco 2013-11-16 03:32:36 -06:00
mdipierro 9883590a91 Merge pull request #295 from niphlod/enhancement/mssql4
improved performance on mssql4
2013-11-16 01:24:55 -08:00
mdipierro b11bdddfe2 Merge pull request #294 from timrichardson/issue/1773
replace write to stderr with LOGGER in failed database connection attemp...
2013-11-16 01:24:18 -08:00
mdipierro ff7ef47cc7 fix issue 1777:MongoDB: upload representation error, thanks Francisco Betancourt 2013-11-16 03:16:57 -06:00
niphlod 7c8c9bc3af improved performance on mssql4 2013-11-13 23:18:07 +01:00
tim be9027f36f replace write to stderr with LOGGER in failed database connection attempt 2013-11-13 17:42:21 +11:00