GithubHelp home page GithubHelp logo

sqlfocus's People

Contributors

jdan735 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

xuhg-zjcn

sqlfocus's Issues

error happened example code in README.md

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.