Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Database > Administrative frontents

    Vino 0.1.0

    Download button

    No screenshots available
    Downloads: 134  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Hsiaoming Yang | More programs
    BSD License / FREE
    July 19th, 2012, 11:20 GMT
    ROOT / Database / Administrative frontents

     Read user reviews (0)  Refer to a friend  Subscribe

    Vino description

    Vino Is Not ORM

    Vino is not ORM. Yes, it's true, it's not ORM.

    Get Started

    A quick view with Vino:

    # setup
    # db = Vino('engine://user:passwd@host:port/database')
    db = Vino('sqlite://db.sqlite')

    # query
    db.table('user').find(username='lepture').fetch()

    # create
    db.table('user').create(username='lepture', website='http://lepture.com')
    db.commit()

    # update
    db.table('user').find(username='lepture').update(username='Hsiaoming Yang')
    db.commit()

    # delete
    db.table('user').find(username='lepture').delete()
    db.commit()


    Setup

    We will only support sqlite3 and mysql by now.

    SQLite

    SQLite with relative path:

    db = Vino('sqlite://relative/path/db.sqlite')

    SQLite with absolute path:

    db = Vino('sqlite:///root/path/db.sqlite')

    Please note, it's different from SQLAlchemy.

    MySQL

    MySQL with all information:

    db = Vino('mysql://lepture:123456@localhost:3306/test')

    MySQL with less information:

    db = Vino('mysql://lepture@localhost/test')

    Default port is 3306.

    Please note, it's utf8 by default.

    Query

    Find all data:

    db.table('user').fetch()

    Find all specified data:

    db.table('user').find(username='lepture').fetch()

    Find the first data:

    # fetch 1 will not return a list
    db.table('user').find(username='lepture').fetch(1)


    Limit on query:

    db.table('user').find(username='lepture').fetch(5, offset=3)

    Multiple filters:

    db.table('user').find(username='lepture', age=20).fetch()

    Advanced filters:

    # just like Django

    db.table('user').find(age__in=[20, 22]).fetch()
    db.table('user').find(age__gt=20).fetch()
    db.table('user').find(age__lt=20).fetch()
    db.table('user').find(age__gte=20).fetch()
    db.table('user').find(age__lte=20).fetch()

    # more see documentation


    More Advanced filters:

    db.table('user').find(age__ne=20).fetch() # not equal
    db.table('user').find(age__nin=[20, 22]).fetch() # not in


    # more see documentation

    Query order:

    db.table('user').find(age=20).order('-id').fetch()

    Delete

    Delete all data:

    db.table('user').delete()
    db.commit()


    Delete specified data:

    db.table('user').find(username='lepture').delete()
    db.commit()



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    MySQL frontend | SQLite frontend | database frontend | Python | MySQL | SQLite

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM