jdan735 / sqlfocus Goto Github PK
View Code? Open in Web Editor NEWSimple wrapper for sql
License: MIT License
Simple wrapper for sql
License: MIT License
I use pip install this package, then copy example code from "README.md" to ipython and run it. an error happend.
<ipython-input-2-dc4ba8e97236>:10: RuntimeWarning: coroutine 'SQLTableBase.create' was never awaited
table.create(exists=True, schema=(
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
<ipython-input-2-dc4ba8e97236>:17: RuntimeWarning: coroutine 'SQLFocus.fetch.<locals>.outer.<locals>.wrapper' was never awaited
table.select()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-dc4ba8e97236> in <module>
16 'SELECT * FROM test WHERE id = 23455 AND name = "None"'
17 table.select()
---> 18 table.select(where=[table.id == 23455,
19 table.name == "None"])
20
I call .send(None) for coroutine of create table, error still happened.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-3abdc7eac9a6> in <module>
----> 1 table.create(exists=True, schema=(
2 ("id", "INTEGER"),
3 ("name", "TEXT")
4 )).send(None)
~/.local/lib/python3.8/site-packages/sqlfocus/table.py in create(self, schema, exists)
38 self.__load()
39
---> 40 return await self.execute(CREATE_SQL.format(
41 name=self._name,
42 exists="IF NOT EXISTS " if exists else "",
~/.local/lib/python3.8/site-packages/sqlfocus/table.py in execute(self, sql)
46 async def execute(self, sql):
47 logger.debug(sql)
---> 48 return await self._conn.execute(sql)
49
50 async def commit(self):
TypeError: object sqlite3.Cursor can't be used in 'await' expression
why use await for sqlite here?, how use the package?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.