(changeset: 1322:a4378725f3cb):
db.tester.insert(name='name')
sql.pyc in insert(self, **fields)
3619 elif field.required:
3620 raise SyntaxError,'Table: missing required
field: %s'%field
-> 3621 return self._db._adapter.insert(self, new_fields)
3622
3623 def _truncate(self, mode = None):
sql.pyc in insert(self, table, fields)
661
662 def insert(self,table,fields):
--> 663 query = table._insert(**fields)
664 try:
665 self.execute(query)
TypeError: _insert() argument after ** must be a mapping, not list
Probably this error is related to the newest DAL changes.
On Dec 4, 7:32 pm, mdipierro <[email protected]> wrote:
> The good news...
>
> I have finished the new DAL for RDBMs. If you now replace gluon/sql.py
> with gluon/dal.py as long as you do not use GAE, everything should
> work fine. All tests pass.
>
> The new dal should have all the features as the old dal but no more.
> It just comes with a better more modular design that will allow adding
> new features.
>
> It defines the following classes:
>
> class ConnectionPool(object):
> class BaseAdapter(ConnectionPool):
>
> # adapters
> class SQLiteAdapter(BaseAdapter):
> class JDBCSQLiteAdapter(SQLiteAdapter):
> class MySQLAdapter(BaseAdapter):
> class PostgreSQLAdapter(BaseAdapter):
> class JDBCPostgreSQLAdapter(PostgreSQLAdapter):
> class OracleAdapter(BaseAdapter):
> class MSSQLAdapter(BaseAdapter):
> class MSSQLAdapter2(MSSQLAdapter):
> class FireBirdAdapter(BaseAdapter):
> class FireBirdEmbeddedAdapter(FireBirdAdapter):
> class InformixAdapter(BaseAdapter):
> class DB2Adapter(BaseAdapter):
> class IngresAdapter(BaseAdapter):
> class IngresUnicodeAdapter(IngresAdapter):
>
> # exposed by DAL
> class Row(dict):
> class SQLCallableList(list):
> class DAL(dict):
> class SQLALL(object):
> class Reference(int):
> class Table(dict):
> class Expression(object):
> class SQLCustomType:
> class Field(Expression):
> class Query(object):
> class Set(object):
> class Rows(object):
>
> TODO:
>
> 1)
> test dal.py
> test dal.py
> test dal.py
>
> 2)
> break gluon/dal.py into
> gluon/dal/__init__.py
> gluon/dal/pooling.py
> gluon/dal/adapter_base.py
> gluon/dal/adapter_*.py
>
> 3)
> reimplement gluon/contrib/gql.py as
> gluon/dal/adapter_nosql.py
> gluon/dal/adapter_gae.py
>
> 4)
> implement
> gluon/dal/adapter_mongodb.py
> etc.
>
> Can you help with 1) and 2)?
>
> Massimo