[sqlalchemy] Adjacency List tree - inefficient reading

2009-01-18 Thread Kless
SQA recommends the adjacency list pattern [1] over another patterns: Despite what many online articles say about modified preorder, the adjacency list model is probably the most appropriate pattern for the large majority of hierarchical storage needs, for reasons of concurrency, reduced

[sqlalchemy] Re: Adjacency List tree - inefficient reading

2009-01-18 Thread Kless
?    That is the most common accessor   I'd like on a self referential node and I'm not aware of how to do   it.   It makes it sort of impossible for there to be a .children   accessor on a node, unless you load the full subtree and organize. On Jan 18, 2009, at 1:33 PM, Kless wrote: SQA recommends

[sqlalchemy] Re: Creating a custom type

2009-01-01 Thread Kless
):                         return hasher.create(value[0], value[1])                 But since this is really an instance-level business rule, a straight   descriptor and no custom type is definitely how I'd go on this one. On Dec 21, 2008, at 6:47 PM, Kless wrote: Thank you for detailed answer

[sqlalchemy] LucidDB - open RDBMS with advanced features

2009-01-01 Thread Kless
Here there is a presentation [1] over LucidDB [2], a new open-source RDBMS with advanced features and greater performance than MySQL. Besides column-store, other features covered include bitmap indexing, hash join/aggregation, page-level multiversioning, intelligent prefetch, star-join

[sqlalchemy] Re: Creating a custom type

2009-01-01 Thread Kless
=BycryptMapperExtension()) On Jan 1, 2009, at 1:35 PM, Kless wrote: I've been trying create the extension. Here is the code with a test:  http://paste.pocoo.org/show/97502/- Extension  http://paste.pocoo.org/show/97503/- Test I need help to solve this little issue: entity

[sqlalchemy] Re: Creating a custom type

2009-01-01 Thread Kless
I just see that will be by a problem of change in API AttributeError: 'str' object has no attribute '_descriptor' Kless ha escrito: It's being passed from the IsBcrypt constructor, so: entity._descriptor.add_mapper_extension(BcryptMapperExtension()) On 1 ene, 19:48, Michael Bayer mike

[sqlalchemy] Re: Creating a custom type

2009-01-01 Thread Kless
help you with that here. Good luck. On 1 ene, 21:01, Jonathan LaCour jonathan-li...@cleverdevil.org wrote: Kless wrote: I just see that will be by a problem of change in API AttributeError: 'str' object has no attribute '_descriptor' As I indicated to you over on the Elixir list, you seem

[sqlalchemy] Get value for each instance

2008-12-24 Thread Kless
How to get the value for a column for each instance --from a descriptor--? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To

[sqlalchemy] Re: Get value for each instance

2008-12-24 Thread Kless
Well, at the end I found a post that could be the solution: http://beachcoder.wordpress.com/2007/05/02/adding-event-callbacks-to-sqlalchemyelixir-classes/ On 24 dic, 15:48, Kless jonas@googlemail.com wrote: How to get the value for a column for each instance --from a descriptor

[sqlalchemy] Re: Creating a custom type

2008-12-22 Thread Kless
(value, tuple):                         return hasher.create(value[0], value[1])                 But since this is really an instance-level business rule, a straight   descriptor and no custom type is definitely how I'd go on this one. On Dec 21, 2008, at 6:47 PM, Kless wrote: 2) It's

[sqlalchemy] Re: Creating a custom type

2008-12-22 Thread Kless
it thorught a descriptor, as you said. On 22 dic, 09:37, Kless jonas@googlemail.com wrote: Thank you. Your aid is incalculable as always. I'll use a descriptor for this case as you well advise. --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Creating a custom type

2008-12-21 Thread Kless
I'm trying to build a custom type [1] to manage the bcrypt hashes [2]. --- from bcrypt_wrap import password from sqlalchemy import types class Bcrypt(types.TypeDecorator): Stores a bcrypt hash of a password. impl = types.String #(60) hasher = password.Password() def

[sqlalchemy] Re: Creating a custom type

2008-12-21 Thread Kless
the value of 'instance.admin' of the last record which will be used for all records to commit. 3) I believe that it isn't necessary use *after_insert*. On 21 dic, 17:00, Michael Bayer mike...@zzzcomputing.com wrote: On Dec 21, 2008, at 6:53 AM, Kless wrote: I'm trying to build a custom type [1

[sqlalchemy] Re: New plugins and data types

2008-12-08 Thread Kless
/mirror/sqlalchemy/ On Dec 7, 2008, at 5:01 AM, Kless wrote: I agree in that the SQLalchemy core been more centralized but would be very well if there would be a distributed version control where can be added easily new types. See as example to dm-more [1] -- of Datamapper--, where

[sqlalchemy] New plugins and data types

2008-12-07 Thread Kless
I agree in that the SQLalchemy core been more centralized but would be very well if there would be a distributed version control where can be added easily new types. See as example to dm-more [1] -- of Datamapper--, where there are many contributions and many of them are very interesting. [1]

[sqlalchemy] Re: Little Bug - orm.object_mapper.get_property

2008-07-14 Thread Kless
I refer to the docstring and this is my version: SQLAlchemy-0.5.0beta1- py2.5.egg On Jul 14, 1:59 am, Michael Bayer [EMAIL PROTECTED] wrote: On Jul 13, 2008, at 1:38 PM, Kless wrote: *orm.object_mapper* has an argument called 'raiseerror', and it works ok

[sqlalchemy] Re: Little Bug - orm.object_mapper.get_property [Wrong]

2008-07-14 Thread Kless
(self, key,   resolve_synonyms=False, raiseerr=True) unbound   sqlalchemy.orm.mapper.Mapper method      return a MapperProperty associated with the given key. On Jul 14, 2008, at 3:45 AM, Kless wrote: I refer to the docstring and this is my version:   SQLAlchemy-0.5.0beta1- py2.5.egg

[sqlalchemy] Re: problem with server_default (and/or sa.PassiveDefault in 0.5.beta1

2008-07-13 Thread Kless
It fails with fields of date. It shows: created_at=*datetime.datetime(2008, 7, 13, 13, 59, 57)* On Jun 21, 7:25 pm, Michael Bayer [EMAIL PROTECTED] wrote: that __repr__ is pretty tortured too; a typical ORM-agnostic approach   is:      def __repr__(self):              return %s(%s) % (    

[sqlalchemy] Column class with NULL=False

2008-07-12 Thread Kless
Michael, why don't change the 'Column' class values to *nullable = False, default=''* ? After of reading the down articles I think that set NULL to False by default will avoid possible errors to many people. NULL means something is unknown. [1] NULL needs to be used with prudence and with

[sqlalchemy] Re: Column class with NULL=False

2008-07-12 Thread Kless
Well, the programs has backward incompatibility prior version 1.0 On Jul 12, 5:46 pm, Rick Morrison [EMAIL PROTECTED] wrote: This would be very ugly for backward compatibility. If you want non-null, then just say so in your metadata. Jamming relational design dogma down everyone's throat is

[sqlalchemy] Re: nullable=False by default

2008-07-07 Thread Kless
But I'm supposed that the generation function of autoincrement only works when the field is NULL or there is an integer, so this fails on fields with a string empty. On Jul 7, 8:06 am, Kless [EMAIL PROTECTED] wrote: Yes, I read it. The integer columns with the primary key flag set

[sqlalchemy] Re: nullable=False by default

2008-07-07 Thread Kless
Yes, it's SQLite. I use it into the development. On Jul 7, 4:06 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Jul 7, 2008, at 3:10 AM, Kless wrote: But I'm supposed that the generation function of autoincrement only works when the field is NULL or there is an integer, so this fails

[sqlalchemy] Re: nullable=False by default

2008-07-07 Thread Kless
much in the way of the natural features of   the database in use. On Jul 7, 2008, at 11:09 AM, Kless wrote: Yes, it's SQLite. I use it into the development. On Jul 7, 4:06 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Jul 7, 2008, at 3:10 AM, Kless wrote: But I'm supposed

[sqlalchemy] nullable=False by default

2008-07-06 Thread Kless
Is possible create the fields with nullable=False by default? It's heavy to have to add this to each field. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Re: nullable=False by default

2008-07-06 Thread Kless
workaround by def Column0( *a,**k): return Column( nullable=False, *a,**k) and use Column0(...) instead of Column... On Sunday 06 July 2008 21:53:52 Kless wrote: Is possible create the fields with nullable=False by default? It's heavy to have to add this to each field

[sqlalchemy] Re: nullable=False by default

2008-07-06 Thread Kless
got multiple values for keyword argument 'default' On Jul 6, 7:53 pm, [EMAIL PROTECTED] wrote: u can workaround by def Column0( *a,**k): return Column( nullable=False, *a,**k) and use Column0(...) instead of Column... On Sunday 06 July 2008 21:53:52 Kless wrote: Is possible

[sqlalchemy] Re: nullable=False by default

2008-07-06 Thread Kless
I think that there is a bug. autoincrement doesn't works with *default=''* Any solution to this problem? On Jul 6, 10:46 pm, Kless [EMAIL PROTECTED] wrote: I'm using so: def Column0(*a, **k):     return Column(nullable=False, default='', *a, **k) groups_table = Table('foo

[sqlalchemy] _is_oid

2008-07-06 Thread Kless
Does anybody could say anything more? Defaults to False: used internally to indicate that this column is used as the quasi-hidden oid column --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Fill automatically one column

2008-05-25 Thread Kless
One column could be filled automatically with the value of another 2 columns? If it's possible, how do it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] New data types for PostgreSQL 8.3

2008-05-25 Thread Kless
PostgreSQL 8.3 has any new data types very interesting as enumerated (ENUM) [1], XML [2], Universally Unique Identifiers (UUID) [3]. Another interesting data type would be the monetary type [4]. It would very interesting that could be used from SQLAlchemy. [1]

[sqlalchemy] [Solved] Fill automatically one column

2008-05-25 Thread Kless
This is made from constructor --the __init__ method--. On 25 mayo, 11:54, Kless [EMAIL PROTECTED] wrote: One column could be filled automatically with the value of another 2 columns? If it's possible, how do it? --~--~-~--~~~---~--~~ You received this message