sqlalchemy-citext.

أداة مساعدة SQLAlchemy التي تسمح باستخدام Postgres باستخدام CITEXT
التحميل الان

sqlalchemy-citext. الترتيب والملخص

الإعلانات

  • Rating:
  • رخصة:
  • BSD License
  • السعر:
  • FREE
  • اسم الناشر:
  • Mahmoud Abdelkader
  • موقع ويب الناشر:
  • https://github.com/mahmoudimus/

sqlalchemy-citext. العلامات


sqlalchemy-citext. وصف

Sqlalchemy-citext هو البرنامج المساعد Sqlalchemy يسمح باستخدام Postgres من CITEXT.USAGE```POTHONFROM SQLALCHEMY استيراد Create_Engine، بيانات التعريف، Integerfrom SQLALCHEMY.SCHEMENT، Tableimport Sqlalchemy.orm ك Ormengine = Create_Engine ('postgresql: // localhost / test_db ) meta = بيانات التعريف () test_table = الجدول ("اختبار"، META، العمود ('ID'، عدد صحيح ()، primace_key = true)، العمود ('txt'، citext ()) conn = engine.connnect () meta .Bind = connta.drop_all () meta.create_all () class testobj (كائن): def __init __ (الذات، id_، txt): self.id = id_ self.txt = txt def __repr __ (الذات): العودة "testobj ( R، R) " (Self.ID، self.txt) orm.mapper (testobj، test_table) session = orm.sessionmaker (bind = engine) ses = الجلسة () إلى = testobj (1، txt = 'foofighter' ) ses.add (to) ses.Commit () الصف = ses.query (testobj) .filter (testobj.txt == 'foopighter'). الكل () تأكيد لين (الصف) == 1Print صفوف. كلاوز () ` `الصفحة الرئيسية للمنتج


sqlalchemy-citext. برامج ذات صلة