I'm not sure there is a solution to this problem without changes to sphinx,
but here is what I've got. In my __init__.py, I have:
Session = sessionmaker()
Base = declarative_base()
def init_model(**kwargs):
Initialize the database model
mydb = URL(drivername='mysql',
On Oct 3, 10:58 pm, Sean Davis [EMAIL PROTECTED] wrote:
ProgrammingError: (ProgrammingError) can't adapt 'INSERT INTO
runbrowser_image (id, nobj, focusmetric, focusuniformity, choffset_x,
choffset_y, blu, flu, int_min, int_mean, int_stdev, int_max,
int_median, int_q87, nse_min, nse_mean
ProgrammingError: (ProgrammingError) can't adapt 'INSERT INTO
runbrowser_image (id, nobj, focusmetric, focusuniformity, choffset_x,
choffset_y, blu, flu, int_min, int_mean, int_stdev, int_max,
int_median, int_q87, nse_min, nse_mean, nse_stdev, nse_max, base,
tile_id) VALUES (%(id)s, %(nobj)s,
I am mirroring a database from mysql to postgresql. Mysql allows
indexes to have the same names as columns. I would like to find all
the indexes and rename them systematically to avoid these name
collisions. How can I get the list of indexes and then modify the
names before creating the second
On Sep 30, 11:18 am, Sean Davis [EMAIL PROTECTED] wrote:
I am mirroring a database from mysql to postgresql. Mysql allows
indexes to have the same names as columns. I would like to find all
the indexes and rename them systematically to avoid these name
collisions. How can I get the list
I have been playing with new types using sqlalchemy and have an error
I do not understand. Table schema and type definition are here:
-
def generate_uuid():
return uuid.uuid1()
class GUID(sa.types.TypeEngine):
def __init__(self):
pass
On Sep 27, 5:16 pm, Michael Bayer [EMAIL PROTECTED] wrote:
On Sep 27, 2008, at 3:12 PM, Sean Davis wrote:
I have been playing with new types using sqlalchemy and have an error
I do not understand. Table schema and type definition are here
On Jul 20, 11:28 am, Michael Bayer [EMAIL PROTECTED] wrote:
On Jul 20, 2008, at 7:48 AM, Sean Davis wrote:
I have been playing with 0.5 and have a very simple question. If I
have a mapped class, User, how can I get at the columns of User? I
see lots of constructs like User.c
I have been playing with 0.5 and have a very simple question. If I
have a mapped class, User, how can I get at the columns of User? I
see lots of constructs like User.c, but User has no 'c' attribute
now. I am looking at finding the column types, names (to loop over),
etc.
Thanks,
Sean
I have two tables:
create table a (
id serial primary key,
name varchar(255) unique
);
create table b (
id serial primary key,
subject int references a(id),
object int references b(id),
otherinfo varchar(255)
);
I have been trying to pull ideas together from the self-referential portion
of the
I have a table that has two columns that reference the same table in a
foreign-key relationship. What do I need to specify and where to
avoid the error below?
class 'sqlalchemy.exceptions.ArgumentError': Error determining
primary and/or secondary join for relationship 'FeatureLoc.feature
On Jul 20, 11:57 pm, Sean Davis [EMAIL PROTECTED] wrote:
I have a table that has two columns that reference the same table in a
foreign-key relationship. What do I need to specify and where to
avoid the error below?
class 'sqlalchemy.exceptions.ArgumentError': Error determining
primary
On Tuesday 13 March 2007 07:35, Sean Davis wrote:
We are creating a database that will have a set of autoincrement primary
keys on the tables. However, many of the tables also have one or more
unique keys associated with them. Can we use save_or_update() (and, by
extension, cascade
On Tuesday 06 March 2007 05:32, Sanjay wrote:
Hi All,
Wondering if it is possible to know the size of a file stored in a
deferred column (PickleType), without retrieving the file itself.
I usually try to save the filesize as a separate column.
Sean
Just a quick question, but is there code available to autogenerate code for
SA or Elixir from an existing (rather large) database? I could use SQLSoup
directly, but it really helps me to be able to see the generated code.
Also, some of the classes will benefit from some added methods.
Thanks,
On 2/13/07, vinjvinj [EMAIL PROTECTED] wrote:
I use the mx.UID package to generate all my keys. Is there any way to
specify that this function be called to generate the primary key for
inserts?
Thanks,
Could this not be done on the database side (depends on the RDBMS)?
Sean
I looked over the docs but didn't find an answer (so the answer is probably
no). Does SA allow descriptions (database comments) of tables and/or
columns?
Thanks,
Sean
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Thursday 18 January 2007 07:11, Sanjay wrote:
Hi All,
Trying to implement full text search with PostgreSQL and tsearch2,
being a beginner, I am facing some basic hurdles:
1. How to declare a table in SA, I mean, what SA datatype should
tsvector correspond to?
2. Can the index be defined
On Thursday 18 January 2007 14:19, Chris Shenton wrote:
I'd be interested in how you work this out as I want to do something
similar. Would you be willing to write it up and perhaps post it to
the wiki?
I was able to get MySQL's fulltext search working more quickly than
PostgreSQL's and
I would like to access the underlying psycopg2 connection to get at a DBAPI2
cursor with the ultimate goal of using the copy_from/copy_to protocol for
moving large amounts of data to/from the database. I can't seem to find a
way to do that from a db engine or connection object. Is there a way
On Thursday 18 January 2007 17:42, Jonathan Ellis wrote:
engine.raw_connection().cursor()
Ah, yes! Thanks.
Sean
On 1/18/07, Sean Davis [EMAIL PROTECTED] wrote:
I would like to access the underlying psycopg2 connection to get at a
DBAPI2 cursor with the ultimate goal of using
I am experimenting with autoloading tables from Oracle (9.2) running on a
remote machine. Normal selects using cx_Oracle work just fine. Here is
what I get:
from sqlalchemy import *
eng = create_engine('oracle:// ...')
md = BoundMetaData(eng)
g2r = Table('gene2refseq',md,autoload=True)
On 1/9/07, Andrija Zarić [EMAIL PROTECTED] wrote:
This very strange, because SQLAlchemy is issuing the query like it is
supposed to do. There is bind variable (table_name) but for some
reason cx_Oracle/Oracle is raising ORA-1008.
Can you assert that following is working:
import cx_Oracle
A simple question:
I have a table with one HUGE column. Is there a way to make this column
lazy-loaded?
Thanks,
Sean
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send
On 1/5/07, Lee McFadden [EMAIL PROTECTED] wrote:
On 1/5/07, Sean Davis [EMAIL PROTECTED] wrote:
A simple question:
I have a table with one HUGE column. Is there a way to make this column
lazy-loaded?
http://www.sqlalchemy.org/docs/adv_datamapping.myt#advdatamapping_properties_deferred
I have the following three tables and trying to do a join. See below for
details:
g_main (
gene_id serial primary key,
.
);
g_refseq (
refseq varchar references refseq(refseq),
gene_id int references g_main(gene_id)
);
refseq (
refseq varchar primary key
);
from
On Friday 22 December 2006 10:10, Alan Franzoni wrote:
Any suggestions on what I am missing?
I don't use sqlsoup and I don't know whether you not using it correctly;
btw, if you're in hurry, as a simple workaround, I suggest you add this
line to sqlsoup.py, line 369, just above klass_query
On Tuesday 19 December 2006 05:51, Alan Franzoni wrote:
from sqlalchemy import *
db = create_engine('postgres://user:[EMAIL PROTECTED]/test5')
metadata = BoundMetaData(db)
tb = Table('gffdata',metadata,autoload=True)
This works fine on my system (ubuntu edgy, x86, python 2.5,
I have a simple test case given here:
from sqlalchemy import *
db = create_engine('postgres://user:[EMAIL PROTECTED]/test5')
metadata = BoundMetaData(db)
tb = Table('gffdata',metadata,autoload=True)
Up to this point, I think this looks like what is in the tutorial. However, I
get the
29 matches
Mail list logo