the model that are not reflected in migrations.
I guess this boils down to "is the current db state plus any outstanding
migrations equal to the model in this checkout"...
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example
ity to
work on a small section and do efficient test runs during development.
Creating a database for every unit test feels like something that would
be slow enough to be annoying. How are you creating databases such that
it's fast enough for this not to be the case?
Chris
--
SQLAlch
create_all? Something else?
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description
wargs["include_archived"] is not True and desc["type"] is
Person:
entity = desc["entity"]
query = query.filter(entity.archived == 0)
return query
Kind regards
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapp
Thanks Mike, the assurance it's the right idea was what I wanted to check.
All sorted much appreciated.
On Sun, 7 Feb 2021, 21:49 Mike Bayer, wrote:
>
>
> On Sat, Feb 6, 2021, at 8:56 AM, Chris Simpson wrote:
>
> After posting, I have arrived at *a* solution (which might be awfu
==PlanRequirements.plan_id)\
.filter(PlanRequirements.subscription==1).all()
Kind regards,
Chris
On Saturday, 6 February 2021 at 13:42:54 UTC Chris Simpson wrote:
> Hello,
>
> I'm trying to convert this working SQL query: (SQLAlchemy models are below)
>
> SELECT COUNT(*)
>
Hello,
I'm trying to convert this working SQL query: (SQLAlchemy models are below)
SELECT COUNT(*)
FROM person
JOIN subscription ON
person.id = subscription.person_id
JOIN plan ON
subscription.sku_uuid = plan.uuid
JOIN plan_requirements ON
plan.id = plan_requirements.plan_id
WHERE
INSERT INTO dog (id, xmin, name) VALUES (%(id)s, %(xmin)s, %(name)s)]
[parameters: {'id': 1, 'xmin': '283302364', 'name': 'fido'}]
(Background on this error at: http://sqlalche.me/e/f405)
Note that this is raised when fido_2 is inserted (after fido_1 is merged into a
new session).
Thanks, Chris
the best,
Chris
Sent from my iPhone
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You
rs}")
with session.begin() as trans:
session.add(Dog(name="fido"))
Thanks, Chris.
This email is confidential. If you are not the intended recipient, please
advise us immediately and delete this message.
The registered name of Cantab- part of GAM Systematic is Cantab Capital
"oracle://[proxy_to_user]@my_wallet" worked!
Thanks again.
On Thu, Nov 14, 2019 at 2:14 PM Mike Bayer wrote:
>
>
> On Thu, Nov 14, 2019, at 2:52 PM, Chris Stephens wrote:
>
> I'm attempting to make use of an Oracle wallet with proxy authentication
&
I'm attempting to make use of an Oracle wallet with proxy authentication
passed as strings in URL.
The documentation states:
"Changed in version 1.3: the cx_oracle dialect now accepts all argument
names within the URL string itself, to be passed to the cx_Oracle DBAPI. As
was the case earlier
On 20/06/2019 16:00, Mike Bayer wrote:
On Thu, Jun 20, 2019, at 3:14 AM, Chris Withers wrote:
Hi All,
I'm getting this warning:
SAWarning: Flushing object with incompatible
polymorphic identity ; the object may not refresh
and/or load correctly (this warning may be suppressed after 10
ible polymorphic identity %r; the "
"object may not refresh and/or load correctly",
(object(), 'foo'),
)
with the filter I get no output
Yay! :-) I hate warn filtering, it never seems to work right
for me, sorry, this is probably a rabbit hole that's not worth
On 20/06/2019 18:50, Jonathan Vanasco wrote:
On Thursday, June 20, 2019 at 3:14:06 AM UTC-4, Chris Withers wrote:
How can I indicate in my code that this is intentional and no warning
should be omitted?
Personal option:
I would not mask these. I would let them persist
>> On Thu, Jun 20, 2019 at 2:37 AM Chris Withers > <mailto:ch...@withers.org>> wrote:
>>
>> Hi All,
>>
>> I have some versions that make use of the third party package I no
>> longer use, how do I collapse down alembic revisions that hav
but that doesn't feel right...
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
To view this discussion
they're coming from a third party library that's awaiting a fix), but
the SAWarning doesn't catch the above.
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verif
with this, and then I got pulled onto another project.
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full
that transaction middleware when unit testing and then
for functional testing, I just need to fall back to dropping everything
in the db, or having a fresh db created from scratch?
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org
* your harness has reversed its work.
Unless I'm missing something, neither of these let the test confirm that
the code under test has called commit() when it should.
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post
app closes the session at the end of its
request handling, which seems legit, right?
How come close() doesn't rollback the SessionTransaction if it throws it
away?
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, plea
rd.py", line 40, in
assert session.query(Event).count() == 0
AssertionError
Whereas after the rollback, I'd expect that count to be zero...
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please prov
On 04/06/2019 23:21, Mike Bayer wrote:
On Tue, Jun 4, 2019, at 4:33 PM, Chris Withers wrote:
So, how do I roll back the further subtransaction created by the web
framework instantiating Session from a sessionmaker bound to the
connection in which begin_nested() has been called, which under
by this.
and make
sure there's just the one session. if there are two in play, I'm not
sure how they both get bound to your test transaction.
I believe they start a nested transaction?
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post
On 04/06/2019 14:47, Mike Bayer wrote:
On Tue, Jun 4, 2019, at 3:05 AM, Chris Withers wrote:
Hi All,
What creates session.transaction? I can't spot get __getattr__ magic,
but the only place in the code I see it being created is in .begin(...),
which has a docstring saying that it should
On 04/06/2019 14:49, Mike Bayer wrote:
On Tue, Jun 4, 2019, at 2:15 AM, Chris Withers wrote:
Now, what I'm trying to test is that I haven't forgotten to include
the "with session.transaction". The problem is that, without the
transaction.rollback(), the test passes regardless
Hi All,
What creates session.transaction? I can't spot get __getattr__ magic,
but the only place in the code I see it being created is in .begin(...),
which has a docstring saying that it should no longer be used, so I feel
like I must be missing something?
cheers,
Chris
--
SQLAlchemy
t code under test is committing or rolling back as
required?
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help
to Session, which is a sessionmaker, or
db.close(), be expected to block?
I can't remember whether instantiating a session will open a network
connection, or whether close will similarly do network io, so thought
I'd ask...
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational
processed.
I'm looking at whether something like the mutable extension would have
access to the parent object, to coerce data structures containing
SQLAlchemy objects into serializable form on the way into the database, and
coerce them back to SQLAlchemy objects after a load event.
Thanks ag
or context was passed to the
TypeDecorator then we could use it to get the session. But right now it
appears that there is no hook that does what we want to do. Please would
you accept my request to implement something like this?
Thanks, Chris.
On Tuesday, 28 May 2019 23:42:59 UTC+1, Jonathan Vanasco
Dear Michael,
I have discovered a limitation of TypeDecorators (custom column types): any one
that uses the database (e.g. to load objects serialised in a custom way) has no
way to know which database session to use. During initial load one can use a
global session object, but expired
I think you would actually want to query v$parameter since "compatible" can
be set to a lower version than server which disables 128 lengths.
SQL> select value from v$parameter where name = 'compatible';
VALUE
--
12.2.0
On Thursday, November 8, 2018 at 10:30:19 AM UTC-6, Mike Bayer
Is is possible to implement the following behavior in SQLAlchemy against an
Oracle database? (Bulk inserts returning PK IDs generated by
trigger/sequence on PK column in database)
#database ddl
DROP TABLE INS_RET_TEST;
CREATE TABLE INS_RET_TEST
(ID NUMBER NOT NULL ENABLE,
tribute-mapped ones.
Thanks in advance for your consideration.
Cheers, Chris.
This email is confidential. If you are not the intended recipient, please
advise us immediately and delete this message.
The registered name of Cantab- part of GAM Systematic is Cantab Capital
Partners LLP.
See
source files.
Are you looking for someone else to implement the tests? It should be easy
because we already have a reproducible test case.
Thanks, Chris.
On Wednesday, 5 December 2018 20:24:09 UTC, Mike Bayer wrote:
>
> On Wed, Dec 5, 2018 at 11:04 AM Chris Wilson
> > wrote:
>
that you would consider?
Alternatively, a simpler workaround for our case, where we do not need
polymorphism on the Widget class, would be to short-circuit
_with_polymorphic_mappers() in such cases, so that it doesn't need to call
configure_mappers at all.
Thanks, Chris.
This email is confidentia
On 26/11/2018 06:15, Mike Bayer wrote:
On Sun, Nov 25, 2018 at 12:55 PM Chris Withers wrote:
> Soat the moment you can still say this:
>
> with session.transaction:
>
> which will do the commit and rollback but not the close().
Po
On 18/11/2018 23:38, Mike Bayer wrote:
On Sun, Nov 18, 2018, 6:22 PM Chris Withers <mailto:ch...@withers.org> wrote:
>> Does SQLAlchemy provide a context manager that handles the session
>> lifecycle described here?
>>
https://docs.sqla
mit the session but
not close it?
there's kind of too many options with the Session right now to make
this one size fits all unless you have suggestions.
Indeed, would you believe after almost 10 years, I think sessionmaker()
finally made sense to my brain?
cheers,
Chris
--
SQLAlchemy -
The
of this? Has this already been done?
Thanks,
- Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description
libraries and
projects ;-)
I remember Mike having good reasons against this, but I can't with them,
so what would be bad about making sessions work like this:
with session:
...
...and have that do the above?
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
org/en/latest/orm/session_state_management.html#merging),
>
>
> but that's an in-python check to see if the record already exists,
> rather than allowing the DB to do it. It might work for you, depending
> on how fast you need to process these messages.
>
> Simon
>
>
Python Version: 3.6.6
SQLAlchemy version: 1.2.12
PostgreSQL version: 10.5
This is my fist time using PGSQL over MySQL or SQLite and my first project
using SQLAlchemy over SQLite or the Django ORM. I'm also not very good at
programming in general so please forgive the simple questions.
I have a
eferenced list of "newly
added" PKs in the outer session, instead of using _new.
Thanks, Chris.
This email is confidential. If you are not the intended recipient, please
advise us immediately and delete this message.
The registered name of Cantab- part of GAM Systematic is Cantab
Hi Mike,
Thanks - I really appreciate it!
And thanks again for all of the effort you've put into SQLAlchemy! It is a
"must have" in most of the Python projects I work on these days, and I
regularly sing its praises to my clients.
All the best,
Chris
On Wednesday, July 11, 2018 at
/
*GITHUB: *https://github.com/insightindustry/sqlathanor
Thanks in advance, and I look forward to any thoughts or perspectives you
might have!
All the best,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide
awesome, thanks!
On 01/02/2018 15:50, Mike Bayer wrote:
On Thu, Feb 1, 2018 at 3:27 AM, Chris Withers <ch...@withers.org> wrote:
Hi,
So, I need to add an exclude constraint to a postgres table which has a
boolean column, but:
ProgrammingError: (psycopg2.ProgrammingError) data type b
k
:-/), how can I just add a constraint that I supply as text and put in
__table_args__ somehow?
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiab
Hi All,
How can I introspect from a declaratively mapped model all the other
models/tables that have foreign keys to it?
This keeps like something the ORM layer must know about...
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org
Has anyone done anything like an equivalent of the following but for
Alembic?
https://github.com/plumdog/django_migration_testcase
cheers,
Chris
On 01/12/2017 15:06, Mike Bayer wrote:
it's kind of a PITA but in Openstack we have fixtures which actually
run all the alembic (or sqlalchemy
Fantastic, thanks!
On 06/11/2017 22:46, Jones, Bryan wrote:
All,
I've just updated the package to use the MIT license.
Bryan
On Mon, Nov 6, 2017 at 2:22 PM, Jones, Bryan <bjo...@ece.msstate.edu
<mailto:bjo...@ece.msstate.edu>> wrote:
Chris,
I'm open to BSD or MIT as w
Great looking library, shame about the license.
You particularly attached to GPL3 or would you be amenable to BSD or MIT?
Chris
On 03/11/2017 21:52, Bryan Jones wrote:
All,
I've just released the pythonic_sqlalchemy_query package on PyPI,
which provides concise, Pythonic query syntax
some other stuff
DB.session.commit()
return my_response()
raise my_error()
I would appreciate any and all suggestions. Thank you all in advance for
your help!
Regards,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy
!
-Chris
On Mon, Jul 31, 2017 at 4:05 PM, Mike Bayer <mike...@zzzcomputing.com>
wrote:
> On Mon, Jul 31, 2017 at 4:37 PM, Chris Satterthwaite <cnsat...@gmail.com>
> wrote:
> > Conceptually, what I’m trying to do is:
> >
> > 1) Enable queries for a higher
Conceptually, what I’m trying to do is:
1) Enable queries for a higher level type (e.g. Node) to return all
direct instances and sub-class instances (e.g. Node, [Servers, [UnixType,
[Linux, AIX]]])
2) Enable a set of attributes to be inherited by all sub-types
3) Enable an
Gotcha. Is there any way to specify a default ordering for queries
against a model?
(similar to that offered by the Django ORM?)
cheers,
Chris
On 08/05/2017 23:51, mike bayer wrote:
because, it only works for a really simplistic case, and for all the
other cases, I have no idea what
Hi All,
I see mapper.order_by is deprecated in the latest release. Why is that?
cheers,
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http
.id == 2).first()
Is there any way to force the resulting SQL to use the type of Table.id
instead of the integer type of 2?
Or is there a better way to handle this?
Thanks,
- Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example c
created as part of
create_table() verus as part of an add_column()?
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy-alembi
On 17/01/2017 18:38, mike bayer wrote:
On 01/17/2017 01:05 PM, Chris Withers wrote:
Potentially related issue, given:
class TheTable(Base):
__tablename__ = 'stuff'
__mapper_args__ = dict(
polymorphic_on='type',
polymorphic_identity='base',
)
type = Column
tests it returns nothing.
self.session.query(TheTable) returns both rows, but both as TheTable
instances, which I find a little surprising.
Chris
On 16/01/2017 17:54, mike bayer wrote:
issue
https://bitbucket.org/zzzeek/sqlalchemy/issues/3891/single-inh-criteria-should-be-added-for
is added
On 17/01/2017 15:08, mike bayer wrote:
On 01/17/2017 06:15 AM, Chris Withers wrote:
Great, thanks. I assume has_inherited_table returns False where the
table is defined on the class itself?
it looks like has_inherited_table is just looking for non-None __table__
attribute up the inheritance
Great, thanks. I assume has_inherited_table returns False where the
table is defined on the class itself?
(ie: normal models, and the "base" model in the case of single table
inheritance)
Chris
On 16/01/2017 17:49, mike bayer wrote:
at the declarative level we have t
/b82bea1dbc1393e24116943804b192df056a70e7
...but that feels a bit hacky.
Thoughts?
Chris
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http
le_name='observation')
op.create_primary_key('observation_pkey', 'observation', ['id'])
...but how come my original attempt didn't?
cheers,
Chris
On 10/01/2017 08:03, Chris Withers wrote:
So, I screwed up and realised I really want an auto-incrementing integer
as the primary key for a bu
the migration, I get:
sqlalchemy.exc.IntegrityError: (psycopg2.IntegrityError) column "id"
contains null values
[SQL: 'ALTER TABLE observation ADD COLUMN id INTEGER NOT NULL']
...so what am I doing wrong?
cheers,
Chris
--
You received this message because you are subscribed to the Goo
y need to call
make_transient_to_detached first so that it acts like it was loaded from
the database first.
Nice. Works like I wanted :)
In fact, if your dict is created from a User object in the first place,
I'd just keep that User object, detach it from the session and put it in
your cache...
t;, rather than your excellent but
integration-y "run them all and make sure they build the expected schema".
Thoughts?
Chris
On 23/11/2016 09:20, Tom Lazar wrote:
hi chris,
here’s how we do it in all our projects:
https://github.com/pyfidelity/rest-seed/blob/master/backend/bac
People use pg8000? ;-)
I jest, but under what circumstances does pg8000 make a better choice
that psycopg2?
Chris
On 07/10/2016 14:40, mike bayer wrote:
FYI pg8000 raises ProgrammingError on these
On 10/07/2016 08:56 AM, Mike Bayer wrote:
On 10/07/2016 02:36 AM, Chris Withers wrote
nded up with an IntegrityError)
cheers,
Chris
--
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 thi
and
will now fail...
(I guess I also have a niggle that this feels like SQLAlchemy is doing
more work than it was before, will this have performance implications?)
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe f
On 22/09/2016 14:55, Mike Bayer wrote:
On 09/22/2016 07:30 AM, Chris Withers wrote:
How do you control the order in which columns are added to a
multi-column primary key when using the declarative primary_key=True
syntax?
How about when one of those columns comes from a mixin?
without mixins
Hi All,
How do you control the order in which columns are added to a
multi-column primary key when using the declarative primary_key=True syntax?
How about when one of those columns comes from a mixin?
Context is in the mail below, any help gratefully received!
Chris
Forwarded
provides one for us. However it had occurred to me and we might use
that approach if we have problems with the event listener approach.
Thanks, Chris.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this grou
mapper.version_id_col in mapper._cols_by_table[table]:
and then tries to execute a null UPDATE just in order to get the new
version number, which fails.
It would work if we did a dummy update, for example assigning the PK to
itself, as this would change the version number (xmin) returned by the
s
wrote:
import warnings
warnings.simplefilter("error")
On 09/15/2016 08:07 AM, Chris Withers wrote:
Hi All,
How can I turn SAWarnings into exceptions?
I'm struggling with what to put into the PYTHONWARNINGS environment
variable :-S
cheers,
Chris
--
You received this message b
Hi All,
How can I turn SAWarnings into exceptions?
I'm struggling with what to put into the PYTHONWARNINGS environment
variable :-S
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this grou
ou're just looking for a "drop everything" method I'd probably forego
all that boilerplate and just have "drop_pg_sps", "drop_mysql_sps",
etc. functions and key them off of engine.name in a dictionary or
something.
On 08/15/2016 06:16 AM, Chris Withers wrote:
/eb99d549be02643d4d670db2ee52b93b0c386fb4/mortar_rdb/__init__.py#L134
I'd like to expand to to basically delete as much as possible in a
database to give a clean starting ground for tests...
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubs
,
Chris
--
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, send email to sqlalchemy@googlegroups.
On 22/04/2016 03:04, Ben Finney wrote:
Chris Withers <ch...@simplistix.co.uk> writes:
[no text body]
When posting to mailing lists, please be sure to have a plain text body
with the full information. Not everyone wants to enable HTML in email
just to read a software announcement :-)
thedocs.org/en/latest/
Development happens here: https://github.com/cjw296/chide/
cheers,
Chris
--
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
:28 PM, Chris Withers wrote:
Hey All,
Where is InstanceState.key set?
I'm looking for the code that builds the key used in the identity_map of
the session. Turns out to be not so easy to find...
Chris
--
You received this message because you are subscribed to the Google Groups
Hey All,
Where is InstanceState.key set?
I'm looking for the code that builds the key used in the identity_map of
the session. Turns out to be not so easy to find...
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubs
finds bugs or has suggestions, please mail me!
cheers,
Chris
--
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...@googlegrou
ue, Mar 15, 2016 at 2:12 AM, 'Chris Norman' via sqlalchemy
<sqlalchemy@googlegroups.com <mailto:sqlalchemy@googlegroups.com>> wrote:
Hi,
On 14/03/2016 15:19, Mike Bayer wrote:
On 03/14/2016 11:15 AM, 'Chris Norman' via sqlalchemy wrote:
Hi all,
Hi,
On 14/03/2016 15:19, Mike Bayer wrote:
On 03/14/2016 11:15 AM, 'Chris Norman' via sqlalchemy wrote:
Hi all,
I've tried googling for this, and I get nothing. I have a table to store
data about objects. Each object should have a location property which
links back to the same table
Hi all,
I've tried googling for this, and I get nothing. I have a table to store
data about objects. Each object should have a location property which links
back to the same table. Conversely, each object should have a contents
property which shows all objects which have their location set to
If I declare a Sequence at the class level in a model class declaration
using declarative (SQLAlchemy 0.9.10 on postgres), the sequence is not
created by create_all unless the sequence is explicitly associated with a
Column. My use case is a column which stores a URI; if a row is inserted
that makes it clear *how* to achieve this
association.
On Wed, Jan 27, 2016 at 11:49 AM, Simon King <si...@simonking.org.uk> wrote:
>
> > On 27 Jan 2016, at 18:59, Chris Macklin <chris.mack...@gmail.com> wrote:
> >
> > If I declare a Sequence at the class level in
,
Chris
On Tuesday, 22 December 2015 12:02:40 UTC, Chris Wood wrote:
>
>
>
> On Tuesday, 22 December 2015 01:53:59 UTC, Michael Bayer wrote:
>>
>>
>>
>> On 12/21/2015 07:44 PM, Chris Wood wrote:
>> > Ah, ok - thanks for the explanation - this is different t
,
Chris
On 28/12/2015 15:22, Mike Bayer wrote:
not through the current API, no. you'd need to write some modifier to
the @generative decorator and basically tinker with things to make it do
that.
On 12/28/2015 06:18 AM, Chris Withers wrote:
Hi All
Hi All,
Is there anything I can do to make Query instance non-generative?
query = session.query(Foo)
query.filter(Foo.x==1)
...and have the query actually be modified rather than returning a new
query with the clause added?
cheers,
Chris
--
You received this message because you
can get the sql expression language - compatible table from
your Base-inheriting class as follows:
YourClass.__table__
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving e
On Tuesday, 22 December 2015 01:53:59 UTC, Michael Bayer wrote:
>
>
>
> On 12/21/2015 07:44 PM, Chris Wood wrote:
> > Ah, ok - thanks for the explanation - this is different to how I'd been
> > led to believe it worked! However, I know that even when I'm the
Ah, ok - thanks for the explanation - this is different to how I'd been led
to believe it worked! However, I know that even when I'm the only person
testing the application, I'm still getting a large number of connections.
Is there a likely explanation why?
On Monday, 21 December 2015 18:51:25
ow at a total loss of what to try next. I clearly have failed to
understand some major aspects of connections / pooling - any help or
pointers to help me sort out the number of connections would be majorly
appreciated!
Thanks,
Chris
--
You received this message because you are subscribed to the
Hi All,
Just wanted to double check, is this still the best way to do this:
https://groups.google.com/forum/#!topic/sqlalchemy/6kZaWeqTpHA
foo.op("SIMILAR
TO")(bar)
cheers,
Chris
--
You received this message b
1 - 100 of 555 matches
Mail list logo