Metadata-Version: 1.1
Name: badsql
Version: 1.0.2
Summary: SQL but worse
Home-page: https://github.com/nayakrujul/badsql
Author: Rujul Nayak
Author-email: rujulnayak@outlook.com
License: MIT
Download-URL: https://github.com/nayakrujul/badsql/archive/refs/tags/v_01.tar.gz
Description: # badsql
        This is a file-based version of SQL.
        
        
        
        Pass the headers as the parameter to db()
        
        ```python
        mydb = db(['id', 'name', 'age'])
        ```
        
        Use .insert(pos, row) to add to the table
        
        ```python
        mydb.insert(1, [0, 'Bob', 11])
        mydb.insert(2, [1, 'Sam', 9])
        mydb.insert(3, [2, 'Will', 10])
        ```
        
        Use .display() to show the table
        
        ```python
        print('Full table:\n')
        mydb.display()
        print('\n')
        ```
        
        Use .select(query) to select specific rows
        
        ```python
        print('Where age >= 10:\n')
        mydb.select('age >= 10').display()
        print('\n')
        ```
        
        Any Python-compilable code can be used
        
        ```python
        print('Where len(name) != 4:\n')
        mydb.select('len(name) != 4').display()
        print('\n')
        ```
        
        The .select() method returns a db object
        
        To save the table use .save(filename)
        
        ```python
        mydb.save('table')
        ```
        
        To load in a table from a file use load(filename)
        
        ```python
        db2 = load('table')
        ```
        
        This returns a db object
        
        ```python
        print('Loaded from table.csv:\n')
        db2.display()
        ```
        
        Note:
        
        for .save() and load(), '.csv' is appended at the end of the filename in all cases.
        
        [View on Github](https://github.com/nayakrujul/badsql)
        
Keywords: database,SQL,file
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
