On Tue, Sep 11, 2018 at 9:39 AM George Brande wrote:
>
> Hello.
>
> My angular is using a datepicker to send a date in string format(ex:
> 2018-09-11) to my flask app to postgres via sqlalchemy.
> In my postgres all rows have a column ef_time of timestamps type.(ex:
> 2018-09-07 13:24:30.138)
>
On Tue, Sep 4, 2018 at 3:48 PM wrote:
>
> I'd like to create a mixin to specify naming conventions.
>
> I tried both:
>
> class Base:
> metadata = MetaData(naming_convention={
> "ix": "ix_%(column_0_label)s",
> "uq": "uq_%(table_name)s_%(column_0_name)s",
> "ck":
Here's a version which I *think* does what you want. There are a
couple of things that you might want to note.
First, in your paste, Conversation.user1 and Conversation.user2 are
integer columns, but you are assigning User objects to those
properties. That's not the way SQLAlchemy works - you
On Tue, Aug 28, 2018 at 5:53 PM Simon King wrote:
>
> On Tue, Aug 28, 2018 at 4:32 PM 'Brian DeRocher' via sqlalchemy
> wrote:
> >
> > Hey all,
> >
> > I'm writing some automated tests for some legacy python code using a
> > psycopg2 connection. I'd like
On Tue, Aug 28, 2018 at 4:32 PM 'Brian DeRocher' via sqlalchemy
wrote:
>
> Hey all,
>
> I'm writing some automated tests for some legacy python code using a psycopg2
> connection. I'd like to check data in the database by using SQLAlchemy. I
> rollback the database transaction after each test
.
>
>
> On Wednesday, August 22, 2018 at 10:37:30 AM UTC+2, Simon King wrote:
>>
>> I've never used Pandas, so this may not make any sense, but where does
>> the column "VARIABLE_VALUE" come from? Is it a column in your
>> dataframe?
>>
>>
I've never used Pandas, so this may not make any sense, but where does
the column "VARIABLE_VALUE" come from? Is it a column in your
dataframe?
Simon
On Wed, Aug 22, 2018 at 8:52 AM wrote:
>
> I get the following warnings, when trying to save a simple dataframe to
> mysql.:
>
> >
If you are using SQLAlchemy core, there's this:
http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html#insert-on-conflict-upsert
Does that meet your needs?
Simon
On Tue, Aug 21, 2018 at 3:36 AM Hardik Sanghavi wrote:
>
> Did this get resolved or are we to still ignore it
>
>
> On
You could build this, but it's going to be messy. At the SQL level, if
you look at an Address row, there's not enough information to know
which association table to look in. You'd have to query all of the
association tables (perhaps using a UNION) to find the one that
contains the parent, and then
o generated is not use, how specify it.
>
> auto generated sql : ALTER TABLE invite_code ALTER COLUMN created_at TYPE
> TIMESTAMP WITH TIME ZONE
>
> 在 2018年7月26日星期四 UTC+8下午6:16:10,Simon King写道:
>>
>> On Thu, Jul 26, 2018 at 11:03 AM Yingchen Zhang wrote:
On Thu, Jul 26, 2018 at 11:03 AM Yingchen Zhang wrote:
>
> old model
>
> class User(db.Model):
> __tablename__ = 'users'
> id = db.Column(db.BigInteger, primary_key=True)
> name = db.Column(db.VARCHAR(50), nullable=False)
>
> email = db.Column(db.VARCHAR(200), nullable=False)
>
>
On Mon, Jul 2, 2018 at 4:39 AM Juan wrote:
>
> Hi,
>
> I do not know if this is that I am missing something in how SQLAlchemy
> works or an issue; I have read the doc and searched for an explanation
> but could not find an answer.
>
> When appending via an intermediate table, a M2M relationship
What does the SQL look like for each of your queries?
Can you produce a standalone script that demonstrates the problem? You
could use my script from
https://groups.google.com/forum/#!topic/sqlalchemy/GNIBQMvMRg8 as a
template.
Thanks,
Simon
On Fri, Jun 1, 2018 at 2:41 PM wrote:
>
> I'm
(Note that sqlalchemy-diff is not part of sqlalchemy, it's a tool
built on top of it, and there may not be anyone on this list who has
ever used it)
Something like this might do what you want:
from pprint import pprint
from sqlalchemydiff import compare
On Tue, May 22, 2018 at 12:03 PM, Neethu Abhinav
wrote:
> Hi,
>
> I have installed sqlalchemy 1.2.7, and went through the docs for sqlAlchemy
> Diff, but i am still confused on how to use it effectively for my
> requirement.
>
> We use Oracle 12C
>
> 1. We have two
com> wrote:
> I tried --hidden-import sqlalchemy_teradata. It didnt help. Any way thanks
> for the suggestion.
>
> On Wednesday, May 16, 2018 at 3:26:48 AM UTC-5, Simon King wrote:
>>
>> On Tue, May 15, 2018 at 8:59 PM, <bin...@gmail.com> wrote:
>> &
On Fri, May 18, 2018 at 12:19 PM, Benjamin B. wrote:
> Hello everybody,
>
> TL;DR We are experiencing a bug where, with perfectly valid data, the
> polymorphic_identity is randomly (0,05%) not respected, and the object
> ends-up being the parent class instead of the "requested"
On Tue, May 15, 2018 at 8:59 PM, wrote:
> I have been struggling for a few days due to an issue with SQLAlchemy.
>
> The line of code which is giving problem is
>
> engine =
> sqlalchemy.create_engine('teradata://pwd@DBinstance?driver=Teradata')
>
> This code works perfectly
On Mon, May 14, 2018 at 9:37 AM, wrote:
> Hi, I'm still relatively a newby to SQLAlchemy and not sure if I'm using the
> correct query to achieve what I'm trying to and hoping someone can point me
> in the correct direction or help me understand what I need to use to run the
On Tue, May 1, 2018 at 2:35 PM, wrote:
> I'm using the PrettyPrinted tutorial on Many to Many relationships with
> Flask-SQLAlchemy however what I'm trying to figure out he doesn't go into in
> the tutorial and I haven't had much luck in _Essential SQLAlchemy_ or
>
No, you'll need to convert that to the equivalent SQL.
On Fri, Apr 27, 2018 at 3:14 PM, Jeremy Flowers
<jeremy.g.flow...@gmail.com> wrote:
> But can you still do things like slice(0,5)? Struggling to get that to work
> atm...
>
> On Fri, Apr 27, 2018 at 2:48 PM, Simon King <s
On Fri, Apr 27, 2018 at 12:57 PM, Jeremy Flowers
wrote:
> Right...
> Been trawling back thru this chain of exchanges..
> Looking for this:
>>
>> At this point I would echo Mike's question: why can't you just use
>> "text()"?
>
> Just spotted another comment from Mike,
The ".first()" method applies the DB-specific equivalent of "LIMIT 1"
to the query. Oracle apparently doesn't support the LIMIT keyword, so
SQLAlchemy wraps the entire query in "SELECT ... FROM (subquery) WHERE
ROWNUM <= limit":
On Tue, Apr 24, 2018 at 4:49 AM, sum abiut wrote:
> I have two date picker fields that i want the users to select from date to
> end date. and i want to display data between the two dates that was
> selected. From example form date: 2/14/2018 to date:3/15/2018. when the
>
On Tue, Apr 24, 2018 at 4:43 PM, Steve Murphy wrote:
> I'm just not getting it:
>
> Want: select max(id) from table;
>
> attempt (latest):
>
> from sqlalchemy import *
> from sqlalchemy.engine import reflection
> from sqlalchemy import schema
> from sqlalchemy import exc
>
Trying to diagnose a problem with a query when we don't have any way
to run it for ourselves or sample data to run it against, is very
difficult. If you want more help, I think you're going to need to
produce a self-contained script with your table definitions and some
sample data, that runs
r_name = ?' returned no
> FROM clauses due to auto-correlation; specify correlate() to control
> correlation manually.
>
> I am not sure how I should go about it.
>
> Thanks for your help,
>
> Greetings,
> Sugandha
>
> On Wednesday, 18 April 2018 17:27:36 UTC+2, Simo
Are you executing q2 on it's own, or nested in a larger query? If so,
can you show the code for the larger query.
I ask because you are calling ".correlate(Partsupp, Supplier, Nation,
Region)", which I think has the effect of removing those tables from
the FROM clause, in the assumption that they
On Wed, Apr 11, 2018 at 7:40 AM, Tolstov Sergey wrote:
> I use dynamic constructor for class.
> It works fine for instance who have not foreign keys. But when FK on another
> instance it cannot load them
>
> Example:
> class left (Base):
> id = sqlalchemy.Column(UUID,
On Wed, Apr 4, 2018 at 4:08 AM, Jonathan Vanasco wrote:
>
>
> On Tuesday, April 3, 2018 at 10:34:03 PM UTC-4, Mike Bayer wrote:
>>
>> "does not work" ?
>
>
> wow, i am an awful person. sorry. that is the least helpful description of
> what happens i can think of.
>
> second
On Thu, Mar 29, 2018 at 8:57 AM, wrote:
> Hello,
>
> I had some database problems (unfinished transactions) so I have wrapped
> sqlalchemy database handling functions in following way:
>
> def add(entry, session):
> """Wrapper for db_session.add"""
> try:
>
On Wed, Feb 21, 2018 at 6:14 AM, wrote:
> Hello,
> Suppose I create a db session the normal way:
>
engine = engine_from_config({"sqlalchemy.url":"mysql+pymysql://…"})
Session = sessionmaker(bind=engine)
session = Session()
>
> I noticed that there is now an
OK, so what's not working?
On Fri, Feb 16, 2018 at 10:55 AM, <eugene.de...@gmail.com> wrote:
> Yes session.is_active is True.
> I really sure, because i log this operation.
>
> пятница, 16 февраля 2018 г., 13:50:51 UTC+3 пользователь Simon King написал:
>>
>> You
> написал:
>>
>> You need just that:
>> from proj.core import Session
>>
>> @app.teardown_request
>> def clear_session():
>> Session.remove()
>>
>> Session created with scoper_session, of course. We do not use
>> flask-sqlalchemy pack
gt; elif fetch == 'count':
> return result
> return result.fetchone()
>
> But same error. That variant must always close connection after return, but
> problem in something another.
>
>
>
> четверг, 15 февраля 2018 г., 13:21:51 UTC+3 пользоват
been closed automatically.
> But how it closed if that another session?
> Can you correct my code?
>
>
>
>
> среда, 14 февраля 2018 г., 17:45:59 UTC+3 пользователь Simon King написал:
>>
>> I think there are a couple of problems with this.
>>
>> 1. You are
On Thu, Feb 15, 2018 at 5:09 AM, George wrote:
> I have searched the documentation but didn't find anything useful. Please
> guide me in the right direction.
>
I'm not sure I understand the question. Relationships are part of the
ORM layer of SQLAlchemy, not Core. Can you
print('#FUNCTION NAME: {}'.format(func.__name__))
>
> print(e)
> logging.error(e)
> return default
> return wrapper
>
>
>
>
> среда, 14 февраля 2018 г., 17:06:54 UTC+3 пользователь Simon King написал:
>>
>> T
The pattern you should be aiming for is one in which a fresh
transaction is started for every web request that touches the
database, and that the transaction is closed at the end of the
request. How are you ensuring that at the moment?
Simon
On Wed, Feb 14, 2018 at 12:51 PM,
oth the libraries are surely
> installed.
>
>
> On Friday, 9 February 2018 12:36:26 UTC+1, Simon King wrote:
>>
>> On Wed, Feb 7, 2018 at 2:23 PM, su-sa <sachdeva@gmail.com> wrote:
>> > Hallo everyone,
>> >
>> > I am trying to run all the
On Fri, Feb 9, 2018 at 7:38 PM, Jeremy Flowers
wrote:
> And I do want to use this functionality repeatedly on many columns, hence
> the idea of registering a function.
>
For what it's worth, I would do it something like this:
def removechars(col, chars):
for c in
As you say, .join() produces an inner join by default. You can specify
isouter=True to get a left outer join (or call the .outerjoin method
instead), and full=True to get a full outer join. I think you'd get a
cross join if you just didn't call the .join() method at all.
Simon
On Fri, Feb 9,
(), I did this.
>> print(session.query(Jobmst)
>> .with_entities(Jobmst.jobmst_type, Jobmst.jobmst_name)
>> .first()
>> )
>>
>> and that worked a treat too.
>> Thanks.
>>
>>
>> On Friday, 9 February 2018 11:58:18 UTC,
The chaining-friendly method you are looking for is probably with_entities():
http://docs.sqlalchemy.org/en/latest/orm/query.html#sqlalchemy.orm.query.Query.with_entities
Simon
On Fri, Feb 9, 2018 at 11:52 AM, Jeremy Flowers
wrote:
> From watching your videos I
The main point you should take from Mike's original reply is:
.values() is a weird method and it's pretty old, usually people
just set the columns up front
You probably shouldn't use it.
On Fri, Feb 9, 2018 at 11:45 AM, Jeremy Flowers
wrote:
> Also this didn't
On Fri, Feb 9, 2018 at 6:06 AM, Charles Heizer wrote:
> Hello, does anyone know if it's possible to query a query result in
> SQLAlchemy?
>
> Thanks!
>
I'm not quite sure what you mean. If you've got a Query object with
some filter conditions already defined, you can add
On Wed, Feb 7, 2018 at 2:23 PM, su-sa wrote:
> Hallo everyone,
>
> I am trying to run all the pytest of sqlalchemy. But I always get the error
> - SQLAlchemy requires Mock as of version 0.8.2. I already have the mock
> library installed. Could somebody please help
On Tue, Feb 6, 2018 at 7:08 PM, wrote:
> If I were to go into my MySQL DB and
>
> mysql> SET GLOBAL sql_mode='STRICT_TRANS_TABLES';
>
> would that have the same effect? I find the MySQL documentation somewhat
> lacking on that topic. What are the scope and lifetime of the
On Wed, Jan 31, 2018 at 5:27 PM, Stanislav Lobanov wrote:
> Hello, i need to create a system, that can store historical versions of
> objects.
>
> Example model looks like:
>
> class User(Base):
>id=Column(Integer) # ForeignKey
>start=Column(DateTime)
>
age(satellite=self,
> ground_station=ground_station,
>aos=aos, los=los, tca=tca,
>deltaT=deltaT)
>
>
> `self` should be a reference to the instance of `Satellite` already loaded
> from DB. I will try to div
gt; Simon,
>
> Thanks for your kind answer.
> So when I have several threads trying to insert/update the same database
> (pgsql or sqlite) at the same time, how can I ensure consistency? By using
> scoped session? This will rely on the DB implementation behind, right?
>
> 在 2018年1月15日星
On Sat, Jan 13, 2018 at 3:31 PM, Ruben Di Battista
<rubendibatti...@gmail.com> wrote:
>
>
> On Friday, January 12, 2018 at 10:54:49 AM UTC+1, Simon King wrote:
>>
>> If I understand your code correctly, scheduler.propagate() creates a
>> large number of Passage ins
If I understand your code correctly, scheduler.propagate() creates a
large number of Passage instances, and you only want a small subset of
them to be added to the database. Is that correct?
I would guess that the passages are getting added to the session
because you are setting their 'satellite'
On Thu, Jan 11, 2018 at 4:51 PM, Mischa S wrote:
> In [6]: ClassificationTask.query.update(values={'completed': True})
> INFO [sqlalchemy.engine.base.Engine] base.py:679 BEGIN (implicit)
> INFO [sqlalchemy.engine.base.Engine] base.py:1140 UPDATE schwartz_task
> SET
On Tue, Jan 2, 2018 at 11:59 PM, Nikola Jankovic wrote:
> I have an API endpoint that handles searches from the frontend. A search can
> have a dynamic amount of filters applied to it, including (1) sizes, (2)
> colors, (3) price, and (4) category that are passed through query
On Wed, Dec 13, 2017 at 10:24 PM, Leo Simmons wrote:
> I have a table `special_product_list` and a table
> `special_product_historical_details_list` that holds information of products
> over time, where there's a record in the history table every day for every
> product.
>
> I want
On Sun, Nov 26, 2017 at 11:19 AM, Mischa S wrote:
> I want to have a polymorphic table that gets its identity from a column in a
> "type" table. I have a "task" table and a "task_type" table. I want to be
> able to create task subclasses that say something like:
>
>
On Thu, Nov 23, 2017 at 6:55 PM, Антонио Антуан wrote:
>
>
> чт, 23 нояб. 2017 г. в 20:27, Mike Bayer :
>>
>> On Thu, Nov 23, 2017 at 8:44 AM, Антонио Антуан
>> wrote:
>> >
>> >> A Query can have lots of entities in it, and if
On Thu, Nov 23, 2017 at 5:27 PM, Mike Bayer wrote:
> On Thu, Nov 23, 2017 at 8:44 AM, Антонио Антуан wrote:
>>
>>> A Query can have lots of entities in it, and if you're doing sharding a
>>> single result set can refer to any number of shard
I'm pretty sure that bulk_insert_mappings ends up just calling the
same code that I suggested.
What database are you using? If it's Postgres, you might be interested
in
http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html#psycopg2-batch-mode
(linked from
(TLDR: I think bulk_insert_mappings is the wrong function for you to use)
SQLAlchemy consists of 2 main layers. The Core layer deals with SQL
construction, database dialects, connection pooling and so on. The ORM
is built on top of Core, and is intended for people who want to work
with "mapped
;
> On Thursday, November 16, 2017 at 7:49:54 PM UTC+10, Simon King wrote:
>>
>> On Thu, Nov 16, 2017 at 7:45 AM, <jens.t...@gmail.com> wrote:
>> > Hello,
>> >
>> > I've been exploring some of the session functionality that handles
&
On Thu, Nov 16, 2017 at 7:45 AM, wrote:
> Hello,
>
> I've been exploring some of the session functionality that handles object
> states, and I'm quite confused. Here is what I see:
>
engine = engine_from_config({'sqlalchemy.url': 'mysql+pymysql://…'})
On Wed, Nov 15, 2017 at 12:10 AM, Mike Bayer wrote:
> On Tue, Nov 14, 2017 at 2:58 PM, Olaf wrote:
>> Hello everybody.
>>
>> Is it possible to have the following relationships between three classes
>> (Animal, Car, Description) ?
>>
>> * An animal
On Mon, Nov 13, 2017 at 4:35 PM, Ahmad Javed wrote:
> Thank you Simon. Appreciate your response. Just using session.remove() at
> the end of each request is not closing the connection and leave open
> connections in MySQL database. One more thing I want to tell that we
On Mon, Nov 13, 2017 at 3:58 AM, Ahmad Javed wrote:
> Hi,
>
> We have implemented web applications using Django and SQLAlchemy framework.
> We have distributed system in the company and some API used frequently.
>
> We are facing a problem where MySQL connections reached
On Fri, Oct 27, 2017 at 4:57 PM, wrote:
> My SQLAlchemy version is 1.1.14.
>
> I'm having difficulty understanding behaviours around a polymorphic
> hierarchy.
>
> I have an AbstractConcreteBase and two subclasses.
>
> The ACB declares some attributes shared by the two
gt;:
>>
>> As I mentioned before, "> group_getter>".
>>
>> ср, 25 окт. 2017 г. в 14:19, Simon King <si...@simonking.org.uk>:
>>>
>>> What does self._mapper_zero() return in your
>>> RoutingQuery._execute_and_instances metho
писал:
>>
>> I see that it is not happened when "bind" passed directly to
>> "sessionmaker"
>>
>> сб, 21 окт. 2017 г. в 18:33, Антонио Антуан <a.ch@gmail.com>:
>>>
>>>
>>>
>>> пятница, 20 октября 2017 г.,
>
> I use:
>>>> sqlalchemy.__version__
> '1.0.19'
>
> пятница, 20 октября 2017 г., 16:42:23 UTC+3 пользователь Simon King написал:
>>
>> On Fri, Oct 20, 2017 at 2:15 PM, Антонио Антуан <a.ch...@gmail.com> wrote:
>> > Hi.
>> > I use
On Fri, Oct 20, 2017 at 2:15 PM, Антонио Антуан wrote:
> Hi.
> I use my own `RoutingSession` and `RoutingQuery` implementation, most of it
> inspired by `sqlalchemy.ext.horizontal_shard`:
>
> class RoutingSession(Session):
> def get_bind(self, mapper=None, clause=None,
On Thu, Oct 19, 2017 at 9:10 PM, TazMainiac wrote:
>
>
> On Thu, Oct 19, 2017 at 2:25 PM, Jonathan Vanasco
> wrote:
>>
>> On Thursday, October 19, 2017 at 11:55:49 AM UTC-4, Taz Mainiac wrote:
>>>
>>> So - a morning spent googling does not turn up any
On Fri, Oct 6, 2017 at 9:59 AM, Martin Cigorraga
wrote:
> Hi,
>
> I'm trying to create a simple function to check the reachability of a
> Postgres database using the http method GET; if the connection can't be
> established, it should respond with a custom http error
On Fri, Sep 22, 2017 at 9:42 AM, Simon King <si...@simonking.org.uk> wrote:
> On Fri, Sep 22, 2017 at 8:18 AM, John Smith <johnsmith31...@gmail.com> wrote:
>> I have the following database schema:
>>
>> Table "Parent":
>> 1. id - primary key id
On Fri, Sep 22, 2017 at 8:18 AM, John Smith wrote:
> I have the following database schema:
>
> Table "Parent":
> 1. id - primary key identifier.
> 2. type - polymorphic_identity.
> 3. name - string data column.
>
> Table "Child" - inherits Parent:
> 1. id - primary key
Could you pair a before_commit handler with an after_flush_postexec
handler? The before_commit one would set a flag to say that you are
committing, and the after_flush_postexec one would look for that flag
before proceeding.
Simon
On Fri, Sep 15, 2017 at 12:08 AM, wrote:
>
On Thu, Sep 14, 2017 at 12:07 PM, Ankur Kumar
wrote:
>> I'm reallly sorry.
>
>
> Please also update line number 13 in api.py and api1_py as
>
> old :
> output = session.query(model.Bug_Test.value).with_for_update('read').all()
>
> New:
> output =
On Thu, Sep 14, 2017 at 10:59 AM, Ankur Kumar
wrote:
>> Hello Simon,
>
>
> Thanks,
> I donot want to read uncommitted data.
>
> I want to read committed data by one API server from another API server.
>>
>>
>
> From another API server it keeps showing old data
>
Ah,
On Thu, Sep 14, 2017 at 10:03 AM, Ankur Kumar
wrote:
> I'm using Flask, sqlalchemy with MySQL database for my API server.
>
> It's working fine with one front end API server.
> But now i want to increase a front end API server in my Load balancer.
>
> So, the scenario
I'm pretty sure the bad performance is due to pyodbc (or maybe SQL
Server) not handling *huge* numbers of bind parameters gracefully. You
are generating a query with (batch_size * n_primary_key_columns) bind
parameters, which even in your original version meant 2000 bind
parameters.
Try with a
ld = 'value'
> syntax?
>
> On Wednesday, August 30, 2017 at 12:07:52 PM UTC-4, Simon King wrote:
>>
>> You could also try using executemany:
>>
>>
>> http://docs.sqlalchemy.org/en/latest/core/tutorial.html#executing-multiple-statements
>>
>> I think it would look
h
> contains description text.
>
> Total record count of the table before any deletion is about 1.05 million.
>
> Python version is 3.4.5, running on a modest CentOS desktop and to be fair
> the SQL Server instance is sub optimal for development.
>
> On Wednesday, August 30, 201
55620.0300.0000.1870.000 result.py:1156(fetchone)
> 111310.0300.0000.0770.000 compiler.py:494()
> 111230.0290.0000.0470.000
> type_api.py:452(_cached_bind_processor)
>
> Any guidance to how I can improve the performance of this so
On Tue, Aug 29, 2017 at 9:49 PM, Ken MacKenzie wrote:
> I have a query I have constructed and I had to deal with a composite primary
> key to select items;
>
> q = s.query(cls)
> or_cond = []
> for x in id_batch:
>
> pkf =
On Tue, Aug 22, 2017 at 9:26 AM, Konstantin Kashin wrote:
> # Setup
> Suppose I have a table with two fields: a string primary key and a boolean
> flag. I want to query multiple rows and then update the flag across all of
> them, then commit my changes. I have a MySQL DB with
ms():
> setattr(obj, key, value)
>
>
> On Friday, 18 August 2017 19:47:50 UTC+5:30, Simon King wrote:
>>
>> No, but you can trivially write your own function to do it:
>>
>> def updateobj(obj, data):
>> for key, value in data.items():
>> set
ut I have a dict of keys to be
> updated with that get instance. Is there any specific way of updating
> something like product_live_time_instance.update(data_dict).
>
>
> On Friday, 18 August 2017 19:21:12 UTC+5:30, Simon King wrote:
>>
>> On Fri, Aug 18, 2017 a
On Fri, Aug 18, 2017 at 2:41 PM, pravin battula
wrote:
> Hi,
>
> I'm getting an instance of a model using a primary key like below.
> product_live_time = session.query(ProductLiveTime).get(product_id)
>
> Now, i want to update few columns using the same instance
On Thu, Aug 17, 2017 at 12:35 AM, Neena Parikh wrote:
> Hi there!
>
> I'm looking to create a helper or decorator function that will enable us to
> "mark" a column or table as “unused”, and raise an error if that column or
> table is queried for in SQL.
>
>
> Context
> The
On Fri, Jul 28, 2017 at 12:44 AM, Saurabh Bhandiwad
wrote:
> Hello experts,
>
> Apologies if this question has been asked before, I couldn't find the right
> question on internet which reflects my problem.
>
> In my project i receive SQLITE file and I need to query
On Tue, Jul 25, 2017 at 2:35 AM, Jinghui Niu wrote:
> I was wondering if there is a way to configure Session.commit() so on each
> successful commit, it will return the committed/updated/deleted instance's
> class.__name__ + row.id. Is this possible? Thanks.
No, there's no
The key part of the stack trace is:
File "c:\Program
Files\Anaconda2\lib\site-packages\sqlalchemy\dialects\mssql\base.py",
line 1773, in _get_default_schema_name default_schema_name =
connection.scalar(query)
...which is in this function:
On Fri, Jun 30, 2017 at 12:44 PM, mvidalgarcia wrote:
> Hi, I'm performing a query to some data models but the ORM response time
> looks much higher compared to the SQL one. I have a script to reproduce the
> problem here.
> Currently getting values like
>
>> sql time:
On Wed, Jun 28, 2017 at 6:39 AM, Vigneshrajan wrote:
> Is it is possible to execute stored procedure in connection.execute()
> function?
>
I think it depends on the stored procedure. Do any of these search results help?
On Wed, Jun 28, 2017 at 1:35 AM, Andrew M wrote:
> I can also replicate it with JSON, with a table defined as follows:
>
> class Test(Base):
> __tablename__ = 'test'
> id = Column(INT, primary_key=True, index=True)
> json = Column(JSON, default={})
>
> And
You might be interested in this thread:
https://groups.google.com/forum/#!msg/sqlalchemy/8z0XGRMDgCk/tazeIUsdDgAJ
Simon
On Thu, Jun 15, 2017 at 1:53 PM, 'mike waites' via sqlalchemy
wrote:
> Interestingly I've just discovered the concept of Bundles.
>
secondary="join(user_team_association,
> user_team_association.c.is_manager==true)",
> backref="managers")
>
> seems to be an incomplete join. I’ll look into this tomorrow…
> Jens
>
>
> On Thursday, June 15, 2017 at
Table objects put columns under the ".c" attribute, so you probably
need "user_team_association.c.is_manager".
Simon
On Thu, Jun 15, 2017 at 12:11 AM, wrote:
> Thank you Mike, the composite joins look like something close to what I
> need. However, it seems that they
On Thu, May 18, 2017 at 11:56 PM, jan.karstens via sqlalchemy <
sqlalchemy@googlegroups.com> wrote:
> Upgrading a specific dialect (EXASOL) to 1.1.9 made me stumble across this
> test (part of test_reflection.py):
>
> https://github.com/zzzeek/sqlalchemy/blob/rel_1_1_9/lib/
>
On Thu, May 11, 2017 at 6:18 PM, wrote:
> Hello,
>
> I have a Money composite column, comprised of an `amount` (Decimal) and a
> `currency` (String). Sometimes the amount needs to be NULL, but then I get
> an instance of Money(None, 'GBP'). Is there any way to force the
201 - 300 of 655 matches
Mail list logo