On 11/02/12 21:10, Michael Bayer wrote:
def execproc(procname, engine, queryParams=[]):
function = getattr(func, procname)
function_with_params = function(*queryParams)
return
engine.execute(function_with_params.execution_options(autocommit=True))
Hi Michael,
I tryed this
On 12/02/12 22:01, Michael Bayer wrote:
On Feb 12, 2012, at 5:22 AM, Krishnakant Mane wrote:
On 11/02/12 21:10, Michael Bayer wrote:
def execproc(procname, engine, queryParams=[]):
function = getattr(func, procname)
function_with_params = function(*queryParams)
return
wrote:
On Feb 12, 2012, at 5:22 AM, Krishnakant Mane wrote:
On 11/02/12 21:10, Michael Bayer wrote:
def execproc(procname, engine, queryParams=[]):
function = getattr(func, procname)
function_with_params = function(*queryParams)
return
engine.execute
,
UPDATE, or DELETE and return the results as a named result set.The result rows here are not
quite the same thing as out parameters which are an Oracle concept but fortunately this
is much easier to do than Oracle out parameters.
On Feb 12, 2012, at 12:31 PM, Krishnakant Mane wrote:
Hi
the functions or any sql for that matter.
You could also say conn = engine.connect().execution_options(autocommit=True).
Ah, meaning the connection object is just a formal requirement is it?
Happy hacking.
Krishnakant.
On Feb 12, 2012, at 2:18 PM, Krishnakant Mane wrote:
Hi Michael,
Excelent work
Hello all,
I have an interesting problem for which I am sure some simple solution
must be existing.
I have made a Python function which I will paist below.
Basically what the function does is that it takes 3 parameters, namely
the name of a stored procedure, engine instance and a set of
Thanks Michael,
I will see if this works perfectly with postgresql.
I had tryed func before but did not get any success.
May be this time it will work.
Happy hacking.
Krishnakant.
On 11/02/12 21:10, Michael Bayer wrote:
On Feb 11, 2012, at 8:02 AM, Krishnakant Mane wrote:
Hello all,
I have
May be I am wrong,
But I guess you have not used stored procedures?
If speed and performance is important along with scalability, then
forget database independence and use stored procedurs.
I have built a small function called execProc() which I can send you off
the list.
It just makes use of
Hello all.
I am trying to write some code which after creating tables and related
views trys to create the stored procedures (plpgsql).
code goes some thing like this
engine.execute(create or replace function addRecord(f1 text, f2
t1.fieldname%type ) returns bit as $$
...
begin
...
end;
$$
Hello all.
I have come across an interesting problem with sqlalchemy.
I am using 0.6.8 and plan to shift obviously to the .7 series.
But what ever the version is, I find this is really very interesting.
I have to execute stored procedures written in plpgsql (for postgresql
9.0).
The problem
On 12/09/11 03:09, Michael Bayer wrote:
On Sep 11, 2011, at 3:43 PM, Krishnakant Mane wrote:
On 12/09/11 00:56, Michael Bayer wrote:
You use the func construct to invoke a function. This can be passed to an
execute() method directly where it should embed itself into a SELECT:
from
Thanks michael,
But my problem here is different.
Let me give you the exact stored procedure that we have here for execution.
create or replace function getGroupByCode(group_code
groups.groupcode%type) returns setof groups as $$
declare
res groups;
begin
for res in select * from groups
On 15/10/11 22:17, Michael Bayer wrote:
that sounds like an issue in the procedure itself, such as running it on the wrong database, or the
wrong groups table otherwise. there could be many schemas/databases that contain a
groups table. Get the procedure to work with psql first using
Hello all,
I feel I am seriously missing some point here.
suppose I am creating a class representing a table through orm.
I will asume that it is using declarative syntax.
I wish to know how do we index a field?
that is to say, I need to have indexes on a few fields so that they are
applied to
I think the subject line makes it pritty clear.
I want to know how i can use the expression api to make calls to
postgresql stored procedures written in plpgsql.
For example how to pass input parameters and how to manipulate cursor
objects etc.
happy hacking.
Krishnakant.
--
You received this
,
%(param3)s), {'param1':1, 'param2':2, 'param3':3})
hope this helps !
On Sep 11, 2011, at 1:48 PM, Krishnakant Mane wrote:
I think the subject line makes it pritty clear.
I want to know how i can use the expression api to make calls to postgresql
stored procedures written in plpgsql
hello all,
I am thinking of programming a lot of stored procedures for my
postgresql based application.
I would like to know if using the expression API is a way that can give
me the power of sqlalchemy's eas and comfort, at the same time make use
of the performance bennifits I will get from
Thanks a lot.
On 01/09/11 19:16, Michael Bayer wrote:
I have some interest in working out ways to integrate stored procedures with SQLAlchemy
though at the moment the points of integration are very rudimental.You can invoke a
stored procedure, get results, and also create a selectable
Hello all.
This might be interesting.
I don't know if we are doing some thing wrong.
We use session.query on a table and for adding records we use the orm.
But look at the forwarded email, I don't know what's wrong.
happy hacking.
Krishnakant.
Original Message
Subject:
.
and the constructor of the table instance takes all the parameter hence
the way in which session.add is coded.
Happy hacking.
Krishnakant.
On 07/08/11 21:11, Michael Bayer wrote:
On Aug 7, 2011, at 8:19 AM, Krishnakant Mane wrote:
Hello all.
This might be interesting.
I don't know if we are doing some thing
Hello all,
Subject line says it all.
Basically what I want to do is to get last record from a result set.
I am dealing with a situation where given a date I need to know the last
record pertaining to transaction on a given account.
yes, it is an accounting/ book keeping software.
So I
.
But again, I don't want the entire set of rows in the first place.
I just want that particular row.
Happy hacking.
Krishnakant.
On 20/07/11 19:20, Timuçin Kızılay wrote:
I think, reversing the sort and getting the first record will do.
20-07-2011 16:32, Krishnakant Mane yazmış:
Hello all
On 16/07/11 19:51, Michael Bayer wrote:
On Jul 16, 2011, at 6:08 AM, Krishnakant Mane wrote:
I am still not sure if all performance enhancements of 0.7 have been backported
to 0.6.8.
No performance enhancements have been backported to 0.6.8.
Ok, So is the current 0.6 documentation uptodate
On 12/07/11 20:34, Michael Bayer wrote:
Hi Krishnakant -
0.7.1 is the current stable production release which is where the focus of
development also lies. 0.6 is in maintenance releases at this point.
In that case will I have to change my code if I want to shift from 0.6
to 0.7?
I use
On 12/07/11 23:36, Michael Bayer wrote:
On Jul 12, 2011, at 1:57 PM, Krishnakant Mane wrote:
On 12/07/11 20:34, Michael Bayer wrote:
Hi Krishnakant -
0.7.1 is the current stable production release which is where the focus of
development also lies. 0.6 is in maintenance releases
Hello all.
I have a very quick and short question.
which is the current production release of sqlalchemy.
I mean this in terms of performance and reliability.
let me narrow down the choices as per my knowledge.
is it 0.6 or 0.7?
And if 0.6 then which minor version?
Happy hacking.
Krishnakant.
Hello all.
I use Pylons 0.9.7 and sqlalchemy.
I use the Object Relational Mapper with declarative syntax in a few of
my modules.
I was reading chapter 7 of the Pylons book and I understood that sql
injections can be avoided using the expression api.
But can this be also done using ORM?
I tryed
On 05/07/11 03:03, Malthe Borch wrote:
Think about it this way:
There's two kinds of strings when you're dealing with SQL: 1) SQL
language, 2) your data input. Don't ever include (2) in (1) –– let the
API do it.
How does one do this with the orm?
I am talking about things like session.add
Hello all.
The subject line says it all.
I use declarative syntax in my tables so that I can define and map
tables in a single step.
Now I want to know how I can add index to a certain column.
I understand when we say prymary key it is already indexed or even
foreign kay key for that matter.
hello.
Can some one give me an example of the said query in the subject line?
I have a need to get the max on the id for a given table.
and I want to do it on a session.query(table_instance).max()
I know that is a wrong way, so what is the right syntax?
Happy hacking.
Krishnakant.
--
You
Don't know why this might be happening on an Ubuntu 10.04 machine?
Can some one help solve this?
happy hacking.
Krishnakant.
Original Message
Subject:[Gnukhata-devel] Error installing gnukhata
Date: Wed, 13 Oct 2010 11:06:00 +0400
From: pooja bakshi
Hello all,
I will be interested to know if using ORM for a large scale data
operation is the right approach when it comes to scalability.
Has SQLAlchemy been put to test ever for a select query which involves
getting thousands of records and specially when joins are involved?
I have a
Hello all,
I am using sqlalchemy in an xml rpc based application.
It is an API for accounting software.
The error given belo is encountered inconsistently on the application
and I can't figure out why.
raise exc.TimeoutError(QueuePool limit of size %d overflow %d reached,
connection timed
Hello,
I am using pylons for my web application development.
Currently pylons is in version 1.0 and 0.9.7 is also going stable.
I want to know which is the correct version of sqlalchemy for both
versions of Pylons.
I know it might not make that much of a difference but there are some
changes
use of any deprecated features in SQLAlchemy.
On May 30, 2010, at 12:02 PM, Krishnakant Mane wrote:
Hello,
I am using pylons for my web application development.
Currently pylons is in version 1.0 and 0.9.7 is also going stable.
I want to know which is the correct version of sqlalchemy
Hello,
This might be a very simple question to answer, but I am not finding any
suitable benchmark tests so asking on the mailing list.
I want to know if indexing on certain columns impacts the performance of
sqlalchemy?
for example I am using postgresql with python-psycopg2 and mapping all
hello all,
I am working on a free software for accounting and rural banking in India.
We use Pylons for web application.
Now, my question is in reference to the recent threads on this mailing
list regarding sqlalchemy connections.
I heard that after a certain amount of connections, the library
On Tuesday 16 February 2010 07:01 PM, avdd wrote:
Now the specific problem you see is that the ORM uses the declared
ForeignKeys to determine how to join tables for a relation, but on
your Detail table you have two foreign keys back to account and the
ORM doesn't know which one to use.
38 matches
Mail list logo