Hi Rich,
I don't like using 'name' columns as primary keys I would instead use an
'id' column and would set 'index=True' on the name column.
On the primary key also define a Sequence:
Column('id', Integer, Sequence('tablename_id_seq'), primary_key=True)
On Wed, Jul 30, 2014 at 3:30 AM, Mike Bernson m...@mlb.org wrote:
I have started moving my code base from 0.7.10 to 0.8.7 as first step to
getting
to current version. (There code changes for me to get to 0.9.x where there
are
no code changes to run under 0.8.x)
I have found a problem with a
HI! Jonathan
I use self.trans = self.connection.begin()
but
now i use debug lock before commit
then i try to use my pgAdmin to add or update same data.
and then
it's sussesful to add data by pgAdmin
i think that meaning my trans did not work
and it maybe just can lock the same
On Wed, 30 Jul 2014, Werner wrote:
I don't like using 'name' columns as primary keys I would instead use an
'id' column and would set 'index=True' on the name column.
Werner,
The use of natural keys (such as a vehicle VIN, the US's SSN, or equipment
serial number) is prefered over an
Hi Rich,
On 7/30/2014 15:04, Rich Shepard wrote:
On Wed, 30 Jul 2014, Werner wrote:
I don't like using 'name' columns as primary keys I would instead use an
'id' column and would set 'index=True' on the name column.
Werner,
The use of natural keys (such as a vehicle VIN, the US's SSN, or
I have seen many posts about the QueuePool limit but I really don't know
how to solve it in my code.
The error is: *TimeoutError: QueuePool limit of size 5 overflow 10 reached,
connection timed out, timeout 30*
I start one unique session in the __init__.py like this:
engine =
On Jul 30, 2014, at 9:04 AM, Rich Shepard rshep...@appl-ecosys.com wrote:
On Wed, 30 Jul 2014, Werner wrote:
I don't like using 'name' columns as primary keys I would instead use an
'id' column and would set 'index=True' on the name column.
Werner,
The use of natural keys (such as a
On Wed, 30 Jul 2014, Michael Bayer wrote:
Celko's books are great but surrogate integer PKs are an unavoidable
practice within relational databases, they are a requirement of most DBAs
I've dealt with as they perform predictably in terms of indexing and space
requirements, especially
On Jul 30, 2014, at 12:28 PM, Rich Shepard rshep...@appl-ecosys.com wrote:
On Wed, 30 Jul 2014, Michael Bayer wrote:
Celko's books are great but surrogate integer PKs are an unavoidable
practice within relational databases, they are a requirement of most DBAs
I've dealt with as they
On Wed, 30 Jul 2014, Michael Bayer wrote:
With that, plus the predictable indexing, I'm always going to use them.
But, I think there's a fair degree of preference still here. With natural
PKs, the biggest issue is how much space indexes are going to take up
considering that everything that FKs
On Wed, 30 Jul 2014, Michael Bayer wrote:
Typically a UNIQUE constraint is placed on the natural key to prevent
dupes.
I can see this when the natural key is a single column, but wonder how a
compound natural key is represented if a serial integer is used as the
surrogate 'id' key. For
You make a single explicit UniqueConstraint object that specifies all three.
Sent from my iPhone
On Jul 30, 2014, at 2:30 PM, Rich Shepard rshep...@appl-ecosys.com wrote:
On Wed, 30 Jul 2014, Michael Bayer wrote:
Typically a UNIQUE constraint is placed on the natural key to prevent
On Wed, 30 Jul 2014, Michael Bayer wrote:
You make a single explicit UniqueConstraint object that specifies all three.
Thanks, Mike. I missed that in the docs.
Next question will appear only after a thorough search of your book.
Rich
--
You received this message because you are
Revisiting this question, with coalesce. The target sql is:
SELECT
letter
,COALESCE(cache_counted, 0) AS counted
FROM letters
ORDER BY counted DESC
The closest I can get to it is this:
dbSession.query(
sqlalchemy.func.count(
order_by('counted')
?
there's a feature for 1.0 that will actually search out counted when you pass
as a string and match it up too.
On Jul 30, 2014, at 3:35 PM, Jonathan Vanasco jonat...@findmeon.com wrote:
Revisiting this question, with coalesce. The target sql is:
SELECT
Is there a SQLAlchemy rule defining when single and double quotes are to
be used? I see examples of both in a class, such as this example on page 103
of the 0.9.7 doc:
class Entry(Base):
__tablename__ = 'entry'
entry_id = Column(Integer, primary_key=True)
widget_id =
within python, single and double quotes are interchangeable and to the extent
you see them used inconsistently is due to inconsistency on the part of myself
and in some cases other developers who have written these docs.
On Jul 30, 2014, at 4:44 PM, Rich Shepard rshep...@appl-ecosys.com wrote:
On Wed, 30 Jul 2014, Michael Bayer wrote:
within python, single and double quotes are interchangeable and to the
extent you see them used inconsistently is due to inconsistency on the
part of myself and in some cases other developers who have written these
docs.
Mike,
I thought that might
On 07/30/2014 05:59 AM, 'Frank Liou' via sqlalchemy wrote:
HI! Jonathan
I use self.trans = self.connection.begin()
but
now i use debug lock before commit
I'm afraid I don't know what that means.
then i try to use my pgAdmin to add or update same data.
At least that
FYI, I've found the corresponding pymssql bug. I hope for the fix being
included in their next minor release.
https://github.com/pymssql/pymssql/issues/185
2014. július 27., vasárnap 16:25:23 UTC+2 időpontban Michael Bayer a
következőt írta:
On Jul 27, 2014, at 8:58 AM, Viktor Nagy
that’s great news!
On Jul 30, 2014, at 6:11 PM, Viktor Nagy viktor.n...@gmail.com wrote:
FYI, I've found the corresponding pymssql bug. I hope for the fix being
included in their next minor release.
https://github.com/pymssql/pymssql/issues/185
2014. július 27., vasárnap 16:25:23 UTC+2
On Wednesday, July 30, 2014 3:49:15 PM UTC-4, Michael Bayer wrote:
order_by(‘counted’)
That generates:
ORDER BY counted
I can't figure out a way to apply `.desc()` (or specify `.asc()`) with that
:
ORDER BY counted DESC
I tried going though the docs and constructing various
hey folks -
I'm on vacation from thursday tomorrow through next thursday, so folks please
hold down the fort! I won't be off the grid but I might not be able to get to
my email as regularly.
- mike
--
You received this message because you are subscribed to the Google Groups
sqlalchemy
On Wed, 30 Jul 2014, Michael Bayer wrote:
I'm on vacation from thursday tomorrow through next thursday, so folks
please hold down the fort! I won't be off the grid but I might not be able
to get to my email as regularly.
mike,
Have fun, travel safely, and don't worry about all of us.
Rich
On 30 Jul 2014, at 23:32, Jonathan Vanasco jonat...@findmeon.com wrote:
On Wednesday, July 30, 2014 3:49:15 PM UTC-4, Michael Bayer wrote:
order_by('counted')
That generates:
ORDER BY counted
I can't figure out a way to apply `.desc()` (or specify `.asc()`) with that :
Go off the grid! You deserve it!
--
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
THAT IS EXACTLY WHAT I NEEDED !!!
I seriously spent a very stressful hour today combing through the docs and
trying to construct something that would let me apply a `.desc()` ; I never
thought of looking for a desc function to apply.
Thank you so much!
--
You received this message
27 matches
Mail list logo