I have a problems with a CTE query using multiple consecutive joins (A -> B
-> C -> D). A and B have both relation to other table so they are joined by
that other_id value. C has FK to B and C-D are One to One (id=id).
The query looks like so:
latest_message = (session.query(
()" makes sure this compared on hash/eq
> rather than "is" to accommodate for Table vs. AnnotatedTable
>
>
> On Wed, May 26, 2021, at 11:49 AM, piotr maliński wrote:
>
> It's from sqlalchemy_utils -
> https://sqlalchemy-utils.readthedocs.io/en/latest/orm_helpers.html#get-m
It's from sqlalchemy_utils -
https://sqlalchemy-utils.readthedocs.io/en/latest/orm_helpers.html#get-mapper
śr., 26 maj 2021 o 17:47 Mike Bayer napisał(a):
> get_mapper() is not part of SQLAlchemy where is it?
>
> On Wed, May 26, 2021, at 9:35 AM, piotr maliński wrote:
>
>
>
> On Wed, May 26, 2021, at 9:18 AM, Piotr wrote:
>
> I'm updating "sqlalchemy_django_query" for SQLAlchemy 1.4 and aside of
> that I found a peculiar problem - when I call get_mapper on a table
> (AnnotatedTable) I get a ValueError due to multiple mappers
I'm updating "sqlalchemy_django_query" for SQLAlchemy 1.4 and aside of that
I found a peculiar problem - when I call get_mapper on a table
(AnnotatedTable) I get a ValueError due to multiple mappers found.
The model is inherited by two other models and get_mapper finds mappers for
all 3
2021 o 16:06 Mike Bayer napisał(a):
> _compile_state() is an expensive call so you'd want to avoid doing that
> casually, that's why filter_by_zero is there.
>
>
>
> On Thu, May 20, 2021, at 4:35 AM, piotr maliński wrote:
>
> Managed to get this working:
> https://github.
(a):
> the _joinpoint_zero() can likely be replaced by _filter_by_zero() :
> https://github.com/sqlalchemy/sqlalchemy/blob/master/lib/sqlalchemy/orm/query.py#L1697
>
> I had mentioned this to someone on twitter but they never got back to me
> if it worked or not.
>
>
>
> On Wed, May 19, 20
I'm trying to update this Query class mixin -
https://github.com/mitsuhiko/sqlalchemy-django-query/blob/master/sqlalchemy_django_query.py
to sqlalchemy 1.4.
Aside of joinedload_all removed the Query class changes a lot which breaks
the:
*column = _entity_descriptor(q._joinpoint_zero(),
> On Monday, August 22, 2016 at 11:12:11 AM UTC+2, Piotr Dobrogost wrote:
>
> (...)
> Is there a way to hold off this check until after I map this class like
this
>
> my_table = sa.Table("my_table", meta.metadata, autoload=True,
autoload_with=engine)
&g
On Monday, August 22, 2016 at 12:54:27 PM UTC+2, Simon King wrote:
>
>
> You'd probably be best off copying the SQLAlchemy code into your own
> project - it's not long:
>
>
>
able" has "COL1" column. So it seems in this case
__init__() method is not automatically synthesized.
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emai
to the answer in SA
0.9+ this shouldn't be needed.
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com
> On Wednesday, May 11, 2016 at 11:03:57 AM UTC+2, Simon King wrote:
>> On Wed, May 11, 2016 at 9:39 AM, Piotr Dobrogost
>>
>> What's the reason for these differences?
>
> At least for the quoting issue, it sounds like you aren't using the
> Oracle dialect. What d
ut the mock one does not. Oracle treats
unquoted version as invalid giving the following error:
ORA-00911: invalid character
What's the reason for these differences?
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To
On Tuesday, May 10, 2016 at 2:55:44 PM UTC+2, Simon King wrote:
>
>
> Could you use Alembic's offline mode?
>
> http://alembic.readthedocs.io/en/latest/offline.html
>
Thanks.
Will try.
Regards,
Piotr
--
You received this message because you are subscribed to the Google G
"mock", ...)
>
Thanks Mike.
In addition to DDL that comes from .create_all() there's additional DDL
created by alembic. Is it possible to filter all log messages generated by
SA by type of SQL (DDL in this case)?
Regards,
Piotr
--
You received this message because you are subscribed
engine as a template on which the new engine would
be based upon. Is there any way to do such a copy and modification?
Is the answer above still the best way to get DDL resulting from calling
create_all()?
Best regards,
Piotr Dobrogost
--
You received this message because you are subscribed
ort is exemplar.
Best regards from users of your excellent SQLAlchemy,
Marcin Raczyński i Piotr Dobrogost from Poland
ps.
The original investigation of the issue and suggested fix was done by
Marcin Raczyński.
--
You received this message because you are subscribed to the Google Groups
"sqlalc
On Tue, Apr 26, 2016 at 12:18 AM, Mike Bayer <mike...@zzzcomputing.com> wrote:
>
> On 04/25/2016 11:04 AM, Piotr Dobrogost wrote:
>>
>> Is caching using dogpile what you call "Query cache extension"? If so
>> we don't use it.
>
> this extensio
and does not bring me closer to knowing how to
manipulate DDL for column creation in general.
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails fr
On Fri, Apr 22, 2016 at 5:57 PM, Mike Bayer <mike...@zzzcomputing.com> wrote:
>
> On 04/22/2016 11:51 AM, Piotr Dobrogost wrote:
>>
>> >Column('some_col', nullable=False, info={"oracle_not_null": False})
>> >
>> >then in your @comp
lback being logged:
2016-04-25 16:36:02,975 INFO [sqlalchemy.engine.base.Engine][waitress] ROLLBACK
however I don't know if it answers your last question.
> any of these true for your case ? Looks like you haven't provided a stack
> trace for your issue, I'm sure you have that, so se
On Friday, April 22, 2016 at 5:22:38 PM UTC+2, Mike Bayer wrote:
>
>
> On 04/22/2016 10:40 AM, Piotr Dobrogost wrote:
> > It seems BufferedColumnResultProxy class (used only in Oracle dialect)
> > has a bug.
>
> I cannot confirm it, would need a test case. Here
Hi!
Unfortunately it's impossible to insert empty string in not null column in
Oracle (http://stackoverflow.com/q/203493/95735).
That's why I would like to declare specific column as nullable only for
Oracle dialect.
How to do this?
Regards,
Piotr Dobrogost
--
You received this message
Python type from the db original type and one gets
errors like:
File
"/home/piotr/.virtualenvs/kotti/lib/python2.7/site-packages/sqlalchemy/ext/mutable.py",
line 403, in coerce
raise ValueError(msg % (key, type(value)))
ValueError: Attribute '_acl' does not accept objects of ty
As Oracle does not support inserting empty string into NOT NULL column I
would like to declare specific column as nullable only for Oracle.
How can I do this?
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy&q
ast):
File
"/opt/pycharm/pycharm-2016.1.2/helpers/pycharm/pycharm_load_entry_point.py",
line 12, in
sys.exit(f())
File
"/home/piotr/.virtualenvs/kotti/lib/python2.7/site-packages/pyramid/scripts/pserve.py",
line 60, in main
return command.run()
File
"/home/pi
declaration of "id"
column?
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
T
Hi!
Is it allowed to post questions regarding SQLAlchemy-Continuum's extension
to SQLAlchemy to this group?
I raised related issue at
https://github.com/kvesteri/sqlalchemy-continuum/issues/138
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google
Many To Many: Countries and Languages and this makes very
nice example.
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
le sequence for
such column? Is there some recipe solving this problem?
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to s
es)? If so, do I have to enable this somehow?
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googl
that SA is generating this SQL.
>
I would thought so but I don't know SA to be sure.
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send
On Wednesday, March 16, 2016 at 3:51:16 PM UTC+1, Simon King wrote:
>
> On Wed, Mar 16, 2016 at 1:43 PM, Piotr Dobrogost <
> p...@2016.groups.google.dobrogost.net > wrote:
>
>> Hi!
>>
>> When executing below code
>>
>> DBSession.quer
rror
[SQL: u'UPDATE text_values SET value=? FROM nodes WHERE nodes.id IN (?, ?,
?, ?)'] [parameters: (u'zzz', u'1685', u'175', u'1688', u'180')]
Does SA construct query which is not valid in SQLite?
How can I solve this problem?
Regards,
Piotr Dobrogost
--
You received this message b
n the
situation is that there's some parent_class <-relationship-> target_class
and I want to update objects of target_class having initially objects of
parent_class without explicitly selecting objects of target_class first as
in Jonathan's solution.
Regards,
Piotr
--
You received this
which
is very helpful.
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group,
to know if and what
to insert so that SA would generate UPDATE for objects _related_ (those
accessible via association proxy) to these selected objects.
Regards,
Piotr
>
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscri
objects
(those accessible through association proxy) directly and this is
inconvenient as I would like to treat them as part of the primary objects
and be able to filter/select them for update "through" primary objects by
means of association proxy.
Regards,
Piotr
--
You received th
On Wednesday, February 24, 2016 at 2:41:43 PM UTC+1, Piotr Dobrogost wrote:
>
> Hi!
>
> Let's say I have a model Text with attribute "values" which is association
> proxy.
> I can update single object like this:
> text = session.query(Text).one()
> text.value
org/zzzeek/sqlalchemy/issues/2642/)
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this g
e docs? I don't see it
at http://docs.sqlalchemy.org/en/latest/orm/extensions/associationproxy.html
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails fro
ery?
texts = session.query(Text).all()
texts???values???.update(...)
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
On Wednesday, February 24, 2016 at 4:21:58 AM UTC+1, Mike Bayer wrote:
in that way you can control exactly what __set__() does and it will
> never remove a TextValue object where the same identity is coming in on
> assignment.
>
Mike, thank you very much for your help.
Regar
()
text.values = {'pl': u'modified', 'en': u'modified'}
session.commit()
Working example is at
https://gist.github.com/piotr-dobrogost/74073cf11006fb68e555
What am I doing wrong?
Best regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlal
Hi!
In the FAQ there's entry titled "I’m getting a warning or error about
“Implicitly combining column X under attribute Y”" with the following
example:
class A(Base):
__tablename__ = 'a'
id = Column(Integer, primary_key=True)
class B(A):
__tablename__ = 'b'
# probably not
s explicitly."
By extending example from FAQ I wanted to understand under what
circumstances could same-named columns be made to work.
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from thi
est.
I keep hoping someone has tried continuum with joined table inheritance and
could point out what's wrong here...
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receivin
On Sunday, September 6, 2015 at 11:02:36 PM UTC+2, Piotr Dobrogost wrote:
>
> Hi!
>
> I've recently raised a bug on SQLAlchemy-Continuum's tracker at
> https://github.com/kvesteri/sqlalchemy-continuum/issues/105
>
As I've got no replies on SQLAlchemy-Continuum
e activity on this project lately I thought I
would post here hoping someone knows this extension and could shed some
light on what might be the reason for the error. In the issue there's small
test case and traceback.
Thank you in advance.
Regards,
Piotr Dobrogost
--
You received this message b
J
They have bug tracker on github
(https://github.com/kvesteri/sqlalchemy-continuum/issues) but I have
impression most projects do not welcome _questions_ on their trackers.
Regards,
Piotr
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" g
is
at https://gist.github.com/piotr-dobrogost/4140267dc9dd654f5560
Regards,
Piotr Dobrogost
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchem
, Paweł Piotr Przeradowski wrote:
Hi,
Thanks for reply. It completes with correct results. I am gonna send you a
stripped version of scrips in a private message.
Pawel.
On Tuesday, 21 July 2015 18:06:59 UTC+2, Michael Bayer wrote:
On 7/21/15 7:32 AM, Paweł Piotr Przeradowski wrote
Hi,
Thanks for reply. It completes with correct results. I am gonna send you a
stripped version of scrips in a private message.
Pawel.
On Tuesday, 21 July 2015 18:06:59 UTC+2, Michael Bayer wrote:
On 7/21/15 7:32 AM, Paweł Piotr Przeradowski wrote:
Hi,
First of all thanks
Hi,
First of all thanks for alembic which is great asset to have in your
development toolbelt.
I am experiencing large slowdowns when generating offline or doing online
migrations or even generating history. One of the CPU cores stays at 100%
for a large number of seconds.
I have 141
I'm tryign to do a bulk update using sqlalchemy ShardedSession. I've
stumbled on a problem when i have to do a bulk update without selecting
rows from a database. Here's how I've tried to do it:
class Row(Base, object): #pylint: disable=I0011, R0903
'''
Row
'''
__tablename__
Hello,
Ok, thank you for the answer. I will try to look into that deeper then.
Best regards
W dniu środa, 25 września 2013 02:51:06 UTC+2 użytkownik Michael Bayer
napisał:
On Sep 23, 2013, at 8:13 AM, Piotr Deszyński
desz...@red-sky.pljavascript:
wrote:
I'm tryign to do a bulk update
A simple test case can be found here https://gist.github.com/4214092
Expected result:
Query returns a list of results from database
Current behaviour:
Query throws an exception:
https://gist.github.com/4214131
W dniu środa, 5 grudnia 2012 07:54:48 UTC+1 użytkownik Piotr Deszyński
napisał
Ok, got it working.
Sorry for the problem.
W dniu wtorek, 4 grudnia 2012 16:31:16 UTC+1 użytkownik Michael Bayer
napisał:
test cases and stack traces would be a start
On Dec 4, 2012, at 9:29 AM, Piotr Deszyński wrote:
Hello,
Is there a way to use ZopeTransactionExtension using
Hello,
Is there a way to use ZopeTransactionExtension using ShardedSession? I just
cannot figure it out. When I use it then I'm getting exception during any
query:
unbound method after_begin() must be called with ZopeTransactionExtension
instance as first argument (got SessionMaker instance
napisał:
test cases and stack traces would be a start
On Dec 4, 2012, at 9:29 AM, Piotr Deszyński wrote:
Hello,
Is there a way to use ZopeTransactionExtension using ShardedSession? I
just cannot figure it out. When I use it then I'm getting exception during
any query:
unbound method
that only a tiny
fraction of Debian machines send the popcon¹ data so the number is
probably a lot higher)
[¹] http://qa.debian.org/popcon.php?package=sqlalchemy
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc
stuff)
Questions:
1) can it be done nicer? Specially the part with tables containing BLOB
columns (posters in above example)
2) is there an easy way to do this the opposite way (from SQLite to
PostgreSQL)?
--
-=[ Piotr Ożarowski ]=-
-=[ http://www.ozarowski.pl
63 matches
Mail list logo