Re: [web2py] Re: Domain model and web2py DAL

2015-01-06 Thread Alan Evangelista
In DAL it can be done like one single command: db.define_table('my_items', Field('name', 'string', length=100), Field('description', 'string', length=400), Field('priority', 'integer'), Field('creator_id', 'reference user'), Field('dept_id',

Re: [web2py] Re: Domain model and web2py DAL

2015-01-06 Thread Anthony
Can you provide an example of a request that involves the kind of synchronization you are looking for? On Tuesday, January 6, 2015 7:23:48 AM UTC-5, Alan Evangelista wrote: In DAL it can be done like one single command: db.define_table('my_items', Field('name', 'string',

Re: [web2py] Re: Domain model and web2py DAL

2014-12-24 Thread Alan Evangelista
On Tuesday, December 23, 2014 1:16:52 PM UTC-2, Alan Evangelista wrote: It might be easier if you provide a concrete example of what you are trying to achieve (perhaps using the syntax of an existing ORM or using pseudo-code) and explain how the DAL falls short. Using SQLAlchemy as

Re: [web2py] Re: Domain model and web2py DAL

2014-12-24 Thread Michele Comitini
In DAL it can be done like one single command: db.define_table('my_items', Field('name', 'string', length=100), Field('description', 'string', length=400), Field('priority', 'integer'), Field('creator_id', 'reference user'), Field('dept_id', 'reference

Re: [web2py] Re: Domain model and web2py DAL

2014-12-23 Thread Alan Evangelista
It might be easier if you provide a concrete example of what you are trying to achieve (perhaps using the syntax of an existing ORM or using pseudo-code) and explain how the DAL falls short. Using SQLAlchemy as data mapper below. MyItem class (models.myitem): class MyItem(object):

[web2py] Re: Domain model and web2py DAL

2014-12-15 Thread Leonel Câmara
Well the DAL already implements the data mapper pattern. The memory representation are the tables defined in the models, the persistent representation can be anything really, you could make your own adapter. As for the Domain Model Pattern an easy approximation is using methods and virtual

Re: [web2py] Re: Domain model and web2py DAL

2014-12-15 Thread Derek
I suppose it depends on what you mean by this application logic completely independent from persistent data storage So you certainly can have that completely independent, though you wouldn't persist anything. Is the idea that you'd update a memory representation of objects only, and somehow

Re: [web2py] Re: Domain model and web2py DAL

2014-12-14 Thread Alan Evangelista
Simple is a relative term, I should not have associated it with web2py DAL. What I meant is that I want to make my application logic completely independent from persistent data storage. The only method I know to implement this is using the data mapper design pattern

Re: [web2py] Re: Domain model and web2py DAL

2014-12-14 Thread Anthony
It might be easier if you provide a concrete example of what you are trying to achieve (perhaps using the syntax of an existing ORM or using pseudo-code) and explain how the DAL falls short. Anthony On Sunday, December 14, 2014 2:54:42 PM UTC-5, Alan Evangelista wrote: Simple is a relative

[web2py] Re: Domain model and web2py DAL

2014-11-28 Thread Anthony
I suppose it depends on your requirements, though note that the web2py DAL isn't *that *simple -- you might find you can get pretty far with things like virtual fields http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Virtual-fields, table inheritance

Re: [web2py] Re: Domain model and web2py DAL

2014-11-28 Thread Michele Comitini
You could see DAL as a scoped ORM i.e. for specific kind of objects, these object are Table(s) containing Field(s) and the way to manipulate those objects mimics as much as possible the relational model. By no mean DAL is thin. As a matter of fact it allows extremely sophisticated thing like

[web2py] Re: NOT IN in web2py DAL

2014-06-27 Thread Fernando Vieira
Solution ramal_virtual = db(db.f_ramal_virtual)._select(db.f_ramal_virtual.ramal_fisico) db(~db.fisico_sip_iax.usuario.belongs(ramal_virtual)).select(orderby=db.fisico_sip_iax.usuario) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: How to use web2py DAL with sybase? Can we modify the adapter to use pyodbc?

2012-05-22 Thread dlypka
Our corporate standard OS is 32 bit Windows Vista. The Sybase driver list at sourceforge.net is only for Windows XP which will not work. I searched internet and it looks like the only good sybase driver is one that has to be purchased. There is also one with source which has to be built but that

[web2py] Re: How to use web2py DAL with sybase? Update

2012-05-19 Thread dlypka
Hi: FYI - we did a lot of work to setup the corporate sybase environment and successfully connected to sybase using the sybase client tools Thursday night. And we installed and tested the web2py Welcome app on the corporate laptop. We expect to start trying the web2py sybase adapter on Monday.

[web2py] Re: How to use web2py DAL with sybase?

2012-05-16 Thread Massimo Di Pierro
web2py includes an adapter but nobody has tested it. If you can help us test it we can help you debug any problem that may arise. Compatibility with sybase and other SQL DB engines is a priority. On Wednesday, 16 May 2012 07:47:59 UTC-5, dlypka wrote: I see this posting which has some

[web2py] Re: How to use web2py DAL with sybase? Please point me to the sybase adapter

2012-05-16 Thread dlypka
I do not see any reference to sybase in 1.99.7 dal.py. Please point me to the sybase adapter. There are 2 of us developers here at work who can test it for you on a large corporate sybase database. Thanks. On Wednesday, May 16, 2012 10:42:05 AM UTC-5, Massimo Di Pierro wrote: web2py

[web2py] Re: How to use web2py DAL with sybase? Please point me to the sybase adapter

2012-05-16 Thread Massimo Di Pierro
Will send it tonight. Basically Sybase is almost the same as MSSQL. Do you a preference for one of the pyhton drivers for sybase? On Wednesday, 16 May 2012 10:51:39 UTC-5, dlypka wrote: I do not see any reference to sybase in 1.99.7 dal.py. Please point me to the sybase adapter. There are

[web2py] Re: How to use web2py DAL with sybase? Please point me to the sybase adapter

2012-05-16 Thread dlypka
No preference on which python driver for sybase. So whatever you select is fine with us. Thanks. - Dave Lypka. On Wednesday, May 16, 2012 4:10:28 PM UTC-5, Massimo Di Pierro wrote: Will send it tonight. Basically Sybase is almost the same as MSSQL. Do you a preference for one of the pyhton

[web2py] Re: How to use web2py DAL with sybase? Please point me to the sybase adapter

2012-05-16 Thread Massimo Di Pierro
I just committed a SybaseAdapter using this driver: http://python-sybase.sourceforge.net/ It extends the MSSQLAdapter but uses the other driver and Sybase types. It needs testing. You can use it with DAL('sybase://dsnstring') or DAL('sybase://username:password@hostname:port/dbname') It uses

[web2py] Re: How to use web2py DAL with sybase? Please point me to the sybase adapter

2012-05-16 Thread dlypka
OK I will download the trunk and try it tomorrow. Thanks. On Wednesday, May 16, 2012 4:48:39 PM UTC-5, Massimo Di Pierro wrote: I just committed a SybaseAdapter using this driver: http://python-sybase.sourceforge.net/ It extends the MSSQLAdapter but uses the other driver and Sybase types.