Metadata-Version: 1.1
Name: pynoorm
Version: 0.2.0
Summary: Easier raw SQL, with or without an ORM.
Home-page: https://github.com/jpeyret/pynoorm
Author: JL Peyret
Author-email: jpeyret@gmail.com
License: MIT License
Description: Easier raw SQL, with or without an ORM.
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
        The Binder class
        ----------------
        
        A Binder abstracts differences in the underlying database's bind variable syntax and also grabs bind variables
        from a list of arguments, using dict, then attribute lookup.
        
        Using native database binds also helps to protect you against SQL injection attacks.
        
        supported:  Postgresql, sqlite3, Oracle, MySQL
        
        Simple **sqlite3** example::
        
            from pynoorm.binder import Binder
            binder = Binder.factory("qmark")
        
            #just for test... assign a custid to binder for attribute lookup
            binder.custid = "AMAZON"
        
            query, parameters = binder("select * from orders where custid = %(custid)s", dict(custid="ACME"), binder)
        
        ``query`` and ``parameters`` are now in the sqlite3/qmark format::
        
        	>>> print(query)
        	select * from orders where custid = ?
        	>>> print(parameters)
        	('ACME',)
        
        Oracle, with mutiple parameters?::
        
            import cx_Oracle
            binder_ora = Binder.factory(cx_Oracle.paramstyle)
        
            tqry = "select * from orders where custid = %(custid)s and has_shipped = %(shipped)s"
            query, parameters = binder_ora(tqry, dict(custid="ACME", shipped=1), binder)
        
            >>> print(query)
            select * from orders where custid = :custid and has_shipped = :shipped
            >>> print(parameters)
            {'shipped': 1, 'custid': 'ACME'}
        
        
        
        =======
        History
        =======
        
        0.1.0 (2016-01-17)
        ------------------
        
        * First release on github.
        
        0.1.1 (2016-01-22)
        ------------------
        
        * Registered on PyPI
        
Keywords: sql database multiplatform
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Database :: Front-Ends
Classifier: Operating System :: OS Independent
