Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Stores BMV data into the Sqlite filename

Keyword arguments:

fileName -- Where to store data
bmv_data -- The data to store

            @staticmethod
    def store(fileName, bmv_data):
        """Stores BMV data into the Sqlite filename

        Keyword arguments:

        fileName -- Where to store data
        bmv_data -- The data to store
        """

        con = sqlite3.connect(fileName)

        cur = con.cursor()

        columns  = ', '.join(bmv_data.keys())

        i = 0
        values = []
        for column in bmv_data.keys():
            values.insert(i, bmv_data[column])
            i = i + 1

        cur.execute(
            "INSERT INTO "+ BMVLocalSqlite.TABLE_NAME 
            + "("+ columns +")"
            + " VALUES("+ ', '.join(values) +")"
        )

        con.commit()
        


src/b/m/BMV-0.2.1/bmv/bmv_local_factory.py   BMV(Download)
 
		if format == Formats.SQLITE:
			BMVLocalSqlite.store(file, data)
		else: #Formats.CSV or None
			BMVLocalCSV.store(file, data)