I use sqlalchemy and when I run my program , get the following
notifications:
//
2019-07-22 20:53:41,207 INFO sqlalchemy.engine.base.Engine SELECT
CAST('test plain returns' AS VARCHAR(60)) AS anon_1
2019-07-22
I have a code for mysql.(by sqlalchemy), Now I converted my data to sqlite3
for some reasons.Do i have to use session for sqlite? I already write the
following class for support mysql :
//
I don't know all of function call of sqlalchemy, So i can't use completely,
i have a set of integer (id of my table), I should retrieve project_typpe
field according to list of my id, What do you suggesst code? my table :
(id: int, project_type: text)
--
You received this message because you
Dear all,
I migrated from mysql to sqlite for a tablet project, i made my tables and
work fine with mysql, but dont' work with sqlite,
My question are:
1. hwo can i input utf8 in sqlite?
2. how can input date data type in sqlite?
--
You received this message because you are subscribed to
Dear all,
I have the following code:
//
query = self.dbObj.session.query(MaterialsTable)
rowCounter = self.dbObj.session.query(MaterialsTable)
for attr , val in
Suppose i need to send a set of table field and a value to search, i found
the following code:
///
q = session.query(myClass)for attr, value in web_dict.items():
q = q.filter(getattr(myClass, attr).like(%%%s%% % value))
///
Thank you for your information.
On Sunday, September 1, 2013 10:04:48 PM UTC+4:30, herzaso wrote:
the c object is short for columns (you can use either)
check out http://docs.sqlalchemy.org/en/rel_0_7/core/schema.html
On Sunday, September 1, 2013 8:27:12 PM UTC+3, Mohsen Pahlevanzadeh
Thank you for your information.
On Monday, September 2, 2013 2:33:21 AM UTC+4:30, Simon King wrote:
On 1 Sep 2013, at 18:27, Mohsen Pahlevanzadeh
m.pahle...@gmail.comjavascript:
wrote:
Dear all,
Before apply code or writing code from a documentation, At first i test
Dear all,
I'm using mysql, and define my field as timestamp data type.
Then i defined DateTime in my class table and Table() constructor same
field.
Is it true? Does it save epoch ?
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe
this is more optimal for you or not depends on your use
case...
On Monday, September 2, 2013 9:22:36 AM UTC+10, Mohsen Pahlevanzadeh wrote:
Dear all,
I have the following Table:
sellers = Table('sellers', MetaData(),
Column('id', Integer, primary_key=True
Oh, Thank you.
On Saturday, August 31, 2013 3:19:34 PM UTC+4:30, gbr wrote:
If I understand you correctly, this should help:
http://docs.sqlalchemy.org/en/rel_0_8/core/tutorial.html#conjunctions
On Saturday, August 31, 2013 8:42:47 PM UTC+10, Mohsen Pahlevanzadeh wrote:
Dear all,
I
Dear all,
Before apply code or writing code from a documentation, At first i test it
into test.py,
Now ,I read the following doc:
conjuctions in
sqlalchemyhttp://docs.sqlalchemy.org/en/rel_0_8/core/tutorial.html#conjunctions
I supposed users a class such as tables class:
Dear all,
i get the following traceback for session.query().filter(sellers.c.name ==
'golrang').delete('sellers') line:
///
Traceback (most recent call last):
File /home/mohsen/codes/amlak/amlak/src/test.py, line 106, in module
i solved it with :
///
session.query(Sellers).filter(or_(sellers.c.name ==
'golrang')).delete('sellers')
///
On Monday, September 2, 2013 2:00:49 AM UTC+4:30, Mohsen Pahlevanzadeh
wrote:
Dear all,
i get the following traceback
I solved it vie:
//
session.query(Sellers).filter(or_(sellers.c.name == 'golrang')).delete()
On Monday, September 2, 2013 2:00:49 AM UTC+4:30, Mohsen Pahlevanzadeh
wrote:
Dear all,
i get the following traceback for session.query().filter
Dear all,
I have the following Table:
sellers = Table('sellers', MetaData(),
Column('id', Integer, primary_key=True, autoincrement = True),
Column('name', String, nullable=False),
Column('name_type', String, nullable=False),
Column('addresses', String,
Dear all,
I need to combine conditions, (variable number) , But i do just add
(Insert query) in sqlalchemy,Does sqlalchemy have same featuers?
Please explain with code.
Yours,
Mohsen
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To
:30, Mohsen Pahlevanzadeh wrote:
Dear all,
i have the following delete record function:
def deleteRecord(self,tableObj):
self.session.delete(tableObj);
self.session.commit();
When i call the abobe function, before commit(), i get the following
traceback:
Traceback
Dear all,
When i using Session = Session(); i get the following error:
UnboundLocalError: local variable 'Session' referenced before assignment
*Wher's my problem?*
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group
According to sqlalchey's documentations, we should create class correspond
to table name, such as class MyTable(Base), But i got the following error:
//
class MaterialsTable(Base):
NameError: name 'Base' is not defined
/
my imports:
/
from sqlalchemy
On Saturday, August 24, 2013 11:34:34 AM UTC+4:30, Mohsen Pahlevanzadeh
wrote:
According to sqlalchey's documentations, we should create class correspond
to table name, such as class MyTable(Base), But i got the following error:
//
class MaterialsTable(Base):
NameError: name
I solved my problem with the following code before definition class:
/
Base = declarative_base()
///
On Saturday, August 24, 2013 11:34:34 AM UTC+4:30, Mohsen Pahlevanzadeh
wrote:
According to sqlalchey's documentations, we should create class correspond
to table name
22 matches
Mail list logo