. Are there any disadvantages?
Also refer
http://groups.google.co.in/group/turbogears/browse_thread/thread/8f3b4c4da33d69c8
thanks,
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
Hi,
I think to print SQLAlchemy logo on our company brochure. I think it
is permissible. Is not so? Is there a high resolution logo somewhere?
thanks
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
initialization
It gives me the following exception:
TypeError: ('Task' object is unsubscriptable...
Needing help.
thanks
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
For your call to mapper.populate_instance, you have the arguments for 'row'
and 'instance' reversed.
Yes! reversing it works perfectly. I had guessed the argument sequence
from the MapperExtension.populate_instance, which happens to be
reverse.
thanks a lot!
Sanjay
and support.
Sanjay
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED
I think all one can do is just forget and start over again, when
concurrent modifications error occurs. That means, catchig the
exception and just showing some failure message to the user is all one
can do.
Sanjay
--~--~-~--~~~---~--~~
You received this message
mapper(User, users_table)
Is not using assign_mapper preferable?
--~--~-~--~~~---~--~~
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 unsubscribe
As I recall, this was discussed in TG forum sometime, and there is a
nice way to disable this. Searching there might help...
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
Hi Mike,
Thanks a lot. It works fine (with or without default=0). The problem
was in my TG application, which was not preserving version while
populating the edit form. I made version as a hidden field in the
form, and it works fine now.
Sanjay
=False),
.
.
Column('version', Integer, default=0))
2. Mapping like this:
assign_mapper(session.context, Page, page_tbl,
version_id_col=page_tbl.c.version, properties={...})
But it does not seem working. Are we missing any step?
thanks
Sanjay
So, cherrypy.request.sa_transaction.connection should work.
I had tries that. But it says Exceptions :'function' object has no
attribute 'execute' Don't know why.
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
conn = session.context.get_current().connection(SomeMappedClass)
conn.execute(...)
Thanks! It is exactly what I needed.
BTW, the session transaction is stored in
cherrypy.request.sa_transaction. Does this help simplify the
statements?
thanks again,
Sanjay
where db
entities like metadata and session are imported rather than created by
me, I am confused and could not successfully implement the pattern
provided in the docs.
thanks,
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Thanks a lot, Michael and Eric! This long thread has been quite useful
to me.
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
, primary_key=True, autoincrement =
True),
Column('first_name', Unicode(30)),
Column('last_name', Unicode(30)))
metadata.drop_all()
metadata.create_all()
class Person(object):
pass
assign_mapper(context, Person, person_table)
p1 = Person(first_name=Sanjay, last_name=Patel)
p2
('person_id', Integer, primary_key=True, autoincrement =
True),
Column('first_name', Unicode(30)),
Column('last_name', Unicode(30)))
metadata.drop_all()
metadata.create_all()
class Person(object):
pass
assign_mapper(context, Person, person_table)
p1 = Person(first_name=Sanjay, last_name=Patel
testcase please
Here is the sample code which works perfectly till 0.3.4 and produces
error in newer versions in my system:
from sqlalchemy import *
from sqlalchemy.ext.assignmapper import assign_mapper
from sqlalchemy.ext.sessioncontext import SessionContext
context =
:
class TaskExtension(MapperExtension):
Thanks a lot Simon, Michael! I did not read the documentation properly
and had missed the inheritence. It indeed makes life a lot simpler.
thanks
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed
get_tasklist().
So, probably the question is, What SQLAlchemy code will translate to
SELECT * FROM get_tasklist(). Needing suggestions.
thanks
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
that cannot accept a set\nCONTEXT: PL/pgSQL function get_tasklist
line 6 at return next\n', bound method TaskController.get_tasks of
gcollab.controllers.task.TaskController object at 0xb742716c)
'SELECT get_tasklist()' {}
Am I calling the stored procedure correctly? Need help.
thanks
Sanjay
Hi,
While updated from version 0.3.3 to 0.3.6, I am getting this error:
'MapperExtension' object has no attribute 'translate_row'
A bug? Any clues would help.
thanks
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi All,
Wondering if it is possible to know the size of a file stored in a
deferred column (PickleType), without retrieving the file itself.
Thanks in advance.
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I usually try to save the filesize as a separate column.
Hi Sean, Thanks for the suggestion. I think that might be the only way
to know a filesize without retrieving a file.
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi Rick,
This was exactly what I needed. Thanks a lot!
Sanjay
(I think I wrote this message yesterday also, which did not appear.
Might have pressed the discard button?!)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
create_instance(self, mapper, selectcontext, row, Person):
p = Person()
p.CallAfterInitializationOrFetchingFromDatabas()
return p
assign_mapper(context, Person, person_table,
extension=PersonExtension())
p = Person.Create(first_name=Sanjay, last_name=Patel)
Assert p.full_name
creeped in. It might take
some more time. Till then if somebody does this, kindly post in the
wiki.
thanks
Sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
of willingness and ability in an open-source developer.
Fully seconded. I take SQLAlchemy as a boon to IT industry -
particularly while talking Agile development. I can't think agile
python frameworks entering enterprise level without it.
sanjay
--~--~-~--~~~---~--~~
You
Thanks a lot, guys. Will try a sample application and post in the wiki.
Might take some time - meanwhile, if somebody gets some more stuff,
posting it would help.
thanks
sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed
) for a project and it works quite well., but I am
not being able to guess the pattern.
thanks
sanjay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
. Understanding SA docs recommending psycopg2, a few days back I had
tried to install it. But it gave some error, and I decided not to
bother and be happy with psycopg, as it was working without problems
for me for last few months. That was the mistake, which drained this
timeeffort of all of us.
thanks
sanjay
system, or it's a bug.
thanks
sanjay
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL
)))
metadata.create_all()
assert company_tbl.c.company_id.autoincrement == True
assert company_tbl.c.name.autoincrement == True# passes!
assert company_tbl.c.name.autoincrement == False # fails!
sanjay
--~--~-~--~~~---~--~~
You received this message because
: (ProgrammingError) ERROR: column show_ads
is of type boolean but expression is of type integer
What happens is, while fetching, boolean columns are fetched as integer
type (0, 1).
I don't know whether it is the expected behaviour or a bug. Bringing
to notice, in case it is a bug.
thanks
sanjay
Thanks! Again I am overwhelmed by the excellant response!!
sanjay
--~--~-~--~~~---~--~~
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 unsubscribe
I am implementing @paginate in a few places in a turbogears
application, which needs SelectResults. Wondering whether to configure
it for per Query, per Mapper, or per application mode. Seeking
suggestions on advantages and disadvantages of each.
thanks
sanjay
instance changes get picked up. if you want the more simplistic
comparison method (i.e. using is), set up your PickleType with the
flag mutable=False.
You meant like this?
Column('content', PickleType, mutable=False)
thanks
sanjay
refering to all pages of an website
website.pages(where page_id = 1) # what is the ideal way to do
this
website.pages(where created_at 21-DEC-2006) # and this
pages being a python list, searching for thing iteratively could do
the job, but would involve many database fetches.
thank
sanjay
37 matches
Mail list logo