I want to start using the naming convention but have several questions
regarding this feature:
1. Does the naming convention support Sequences? If not, what's the
proper way of handling them?
2. Are Booleans going to be supported in the near future or will I have
to name them separa
Thanks for caring ;)
On Dec 3, 2015 6:08 PM, "Jonathan Vanasco" wrote:
> Thanks for posting a full self-contained working example of your problem!
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sqlalchemy" group.
> To unsubscribe from this topic,
On Thursday, December 3, 2015 at 5:23:55 PM UTC+2, Michael Bayer wrote:
>
>
>
> On 12/03/2015 10:08 AM, Mike Bayer wrote:
> >
> >
> > On 12/03/2015 06:16 AM, Ofir Herzas wrote:
> >> load_only as stated
> >> in http://docs.sqlalchemy.org/en/late
load_only as stated in
http://docs.sqlalchemy.org/en/latest/orm/loading_columns.html does the
following:
"An arbitrary set of columns can be selected as “load only” columns, which
will be loaded *while deferring all other columns* on a given entity..."
However, joined relationships are not affe
Sqlalchemy 1.0.6
Trying to issue a simple select on a CLOB column, throws the following
exception:
Traceback (most recent call last):
File "/opt/5.3/server/handlers/orm.py", line 81, in select
result = query.all()
File
"/opt/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/qu
xception though it should be easy to reproduce).
I know this property is not a column, hence is why I imagine it could be
right...
On Oct 14, 2015 4:31 PM, "Mike Bayer" wrote:
>
>
> On 10/14/15 5:34 AM, Ofir Herzas wrote:
> > An exception pertaining to the logger is rais
BTW: sqlalchemy 1.0.8, python 3.3.4
On Wednesday, October 14, 2015 at 12:34:04 PM UTC+3, Ofir Herzas wrote:
>
> An exception pertaining to the logger is raised when using query.options
>
> Here is the relevant part of the exception:
>
>
> query = query.options(sql
An exception pertaining to the logger is raised when using query.options
Here is the relevant part of the exception:
query = query.options(sqlalchemy.orm.load_only(*properties))
File
"/opt/enigmai/ve/python-3.3.4/lib/python3.3/site-packages/sqlalchemy/orm/query.py",
line 1100, in optio
bject: Re: [sqlalchemy] MetaData.sorted_tables is inconsistant
On 6/14/15 9:06 AM, Ofir Herzas wrote:
It seems that MetaData.sorted_tables returns a different result each time.
While the results seem to be always correct, it is an odd behavior.
A topological sort is non-deterministic. I
It seems that MetaData.sorted_tables returns a different result each time.
While the results seem to be always correct, it is an odd behavior.
I would expect sorted_tables to return the same results every time
import sqlalchemy as sa
engine = sa.create_engine("", echo=False)
meta = sa.MetaData(b
ut-part-2%3A-adjacency-list-using-ctes/
>
>
>
> On 6/9/15 2:13 PM, Ofir Herzas wrote:
>
> I have a self referencing table like the following:
>
> class Employee(Base):
> __tablename__ = "t_employee"
>
>
> id = sa.Column(BigInteger,
I have a self referencing table like the following:
class Employee(Base):
__tablename__ = "t_employee"
id = sa.Column(BigInteger, sa.Sequence('%s_id_seq' % __tablename__),
primary_key=True, nullable=False)
manager_id = sa.Column(BigInteger, sa.ForeignKey("t_employee.id",
ondelete='
s.com [mailto:sqlalchemy@googlegroups.com] On
Behalf Of Mike Bayer
Sent: Monday, May 04, 2015 6:16 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Does anyone know how to handle "NoSuchColumnError"
On 5/4/15 3:23 AM, Ofir Herzas wrote:
For some reason, I get the following
ke Bayer
Sent: Monday, May 04, 2015 1:47 AM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Does anyone know how to handle "NoSuchColumnError"
On 5/3/15 12:00 PM, Ofir Herzas wrote:
Is there any danger using the implicit_returning=False on the engine? Or is it
the
know how to handle "NoSuchColumnError"
On 5/3/15 2:01 AM, Ofir Herzas wrote:
Hi Michael,
Thank you very much for your fast response. I will give it a try.
I tried to remove unneeded stuff but I think that the problem is in the
track_changes mixin as I never got this error befor
ril 30, 2015 at 7:03:10 PM UTC+3, Michael Bayer wrote:
>
>
>
> On 4/30/15 11:00 AM, Ofir Herzas wrote:
>
> Hi,
> I'm using sqlalchemy 0.9.7 and cx_oracle 5.1.3 and every once in a while
> (inconsistent), I get the following error:
>
> Traceback (most rece
Hi,
I'm using sqlalchemy 0.9.7 and cx_oracle 5.1.3 and every once in a while
(inconsistent), I get the following error:
Traceback (most recent call last):
File
"/opt/enigmai/ve/python-2.7.6/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 1919, in flush
self._flush(objects)
in an employee id group
On Oct 13, 2014, at 1:44 PM, Ofir Herzas wrote:
I have found a solution although it seems a bit messy and doesn't work on
Oracle (throws ORA-00933: SQL command not properly ended):
my_table = sa.sql.table('my_table',
sa.Colum
my_table.c.employee_id, my_table.c.id))
query = my_table.update().values({my_table.c.level: temp.c.rank}).where(
my_table.c.id == temp.c.id)
engine.execute(query)
Can someone help me out here?
I need to fix this query to work on both mysql and Oracle and if there is a
better way to achiev
I have the following table:
my_table = sa.sql.table('my_table',
sa.Column('id', sa.BigInteger),
sa.Column('employee_id', sa.BigInteger))
and I want to add a 'rank' column using alembic. The addition itself is
pretty straight forward using add_column but I also need to populate that
co
co" wrote:
>
>
> On Thursday, September 4, 2014 2:19:34 PM UTC-4, Ofir Herzas wrote:
>>
>> Nevertheless, is there a way to achieve what I want? (which is to
>> selectively load several columns and this 'jobs' property from Employee)
>>
>
>
mns on the EmployeeJob
object.
There are lots of examples at:
http://docs.sqlalchemy.org/en/latest/orm/loading.html
Hope that helps,
Simon
On 4 Sep 2014, at 19:17, Ofir Herzas wrote:
> Nevertheless, is there a way to achieve what I want? (which is to
> selectively load several col
04, 2014 8:42 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] selecting from a relationship
On Sep 4, 2014, at 1:32 PM, Ofir Herzas wrote:
Thanks Michael,
I'm using 0.9.7 and while your example did work, the following did not:
Ok that's not a relationship()
chemy@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Thursday, September 04, 2014 8:00 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] selecting from a relationship
On Sep 4, 2014, at 12:28 PM, Ofir Herzas wrote:
Thanks Simon,
I've tried the following:
d not be the default
behavior (meaning that I don't want the defer the columns at model level)
On Thursday, September 4, 2014 5:59:21 PM UTC+3, Simon King wrote:
>
> On Thu, Sep 4, 2014 at 3:28 PM, Ofir Herzas > wrote:
> > Hi,
> > I have a model similar to the following
Hi,
I have a model similar to the following:
class Employee(Base):
__tablename__ = "t_employee"
id = sa.Column(Identifier, sa.Sequence('%s_id_seq' % __tablename__),
primary_key=True, nullable=False)
first_name = sa.Column(sa.String(30))
last_name = sa.Column(sa.String(30))
: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On
Behalf Of Michael Bayer
Sent: Saturday, July 19, 2014 6:12 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] change Oracle sequence on insert
On Jul 19, 2014, at 3:38 AM, Ofir Herzas wrote:
I have a table
I have a table with the following column:
id = sa.Column(sa.Integer, sa.Sequence('id_seq'), primary_key=True,
nullable=False)
Usually, I have no problems inserting data, but every time I insert rows
with specific id, it causes problems with Oracle since the sequence is not
modified according
Bayer
Sent: Wednesday, June 25, 2014 4:27 PM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Oracle with sequence for primary key and that
sequence out of sync
On 6/25/14, 5:50 AM, Ofir Herzas wrote:
Sorry to barge in, but I'm having the exact same issue and I'm pretty sure
Sorry to barge in, but I'm having the exact same issue and I'm pretty sure
no one altered the sequence manually.
I'm using sqlalchemy 0.8, python 2.7.6, rhel 6.5, oracle 10g, cx_oracle
with the same connection string as above
This issue started just recently after running ok for more than a thou
e in_ operator only for Oracle)
Thanks,
Ofir
On Tuesday, June 17, 2014 4:18:11 PM UTC+3, Michael Bayer wrote:
>
>
> On 6/17/14, 4:32 AM, Ofir Herzas wrote:
> > ORA-01795: maximum number of expressions in a list is 1000
> >
> > As I understand, there are several opt
ORA-01795: maximum number of expressions in a list is 1000
As I understand, there are several options to fix this issue
(e.g.
https://groups.google.com/forum/#!searchin/sqlalchemy/maximum$20number$20of$20expressions/sqlalchemy/Oa6YWNE0-IQ/6GVmy27B-FAJ
or split in_ to several or_)
Why not incor
cls.month + '-' + cls.day, sa.Date)
On Fri, Oct 4, 2013 at 2:25 PM, Ofir Herzas wrote:
> I'm sorry, you should use hybrid_property:
>
> from sqlalchemy.ext.hybrid import hybrid_property
>
> class Plan(Base):
> @hybrid_property
> def calculated_date(self):
&
googlegroups.com
Subject: Re: [sqlalchemy] Query for date between a range
On Fri, 4 Oct 2013 15:55:07 +0300
"Ofir Herzas" wrote:
> You can create a custom field in your model and check against it:
>
> class Plan(Base):
> .
> .
> .
> @property
>
You can create a custom field in your model and check against it:
class Plan(Base):
.
.
.
@property
def calculated_date(self):
return date(self.year, self.month, self.day)
Then, in your query, use that field:
session.query(Plan).filter(Plan.calculated_date.between(fro
Hi Luca,
Keep in mind that contains will not map to 'like'. Hence if you want your
query to have a 'like' clause, you'll have to use the 'like' method (the
end result of 'contains' will be the same though as 'like' beginning and
ending with a percent sign).
On Sep 27, 2013 5:06 PM, "pyArchInit Arc
Each column has a 'like' method, so you should be able to filter by it:
filter(~Table.field.like("%value1%"))
Hi to all,
I need to realize a query like this
select * from my_table where field not like "%value1%" and field not like
"%value2%"
with a sqlalchemy sintax. I looked for around the doc
Haven't tried it myself, but I think you can use the add_columns method of
Query.
Check out http://docs.sqlalchemy.org/ru/latest/orm/query.html
On 4 Sep, 2013 2:05 PM, "lars van gemerden" wrote:
> I think i must be reading over something, but:
>
> is there a way to delay the selection of attri
unlike most other python web servers that
use threads for request handling. How do you make sure that a single request
uses a single SQLAlchemy session, and that the session gets closed properly
at the end of the request?
On Tue, Sep 3, 2013 at 1:08 PM, Ofir Herzas wrote:
> I Agree, but when ther
What's wrong with Member.dateofbirth==datetime.today() ?
On 28 Aug, 2013 7:47 PM, wrote:
> Hi,
>
> I want to retrieve all the people who are born at today's date. I'm using
> Flask with sqlalchemy;
>
> class Member(db.Model):
>>
> ...
>
> dateofbirth = Column(Date)
> ...
>
>
> In my view.py;
>
>
40 matches
Mail list logo