Comments (4)
from walrus.
If you can produce a test script that demonstrates the problem, I will re-evaluate this issue.
from walrus.
`db = Database(host='localhost', port=6379, db=0)
class Store(Model):
database = db
id = AutoIncrementField(primary_key=True,index=True)
tid = IntegerField(primary_key=True,index=True)
store_name = TextField(fts=True,index=True)
store_location = TextField(fts=True,index=True)
store_pincode = TextField(fts=True,index=True)
store_size = TextField(fts=True,index=True)
def get_store(session, store_id):
existing_user = None
store_list = Store.query(Store.tid == int(store_id)) //1
store_list = Store.get(Store.tid == int(store_id)) //2
return store_list
I am not able to run this get_store method, it returns null when filtering through tid column,
from walrus.
db = Database()
db.flushall()
class Store(Model):
__database__ = db
id = AutoIncrementField(primary_key=True, index=True)
tid = IntegerField(index=True)
name = TextField(fts=True, index=True)
for i in range(1, 10):
s = Store.create(tid=i, name='s%s' % i)
for store in Store.query(Store.tid == 2):
print(store.tid, store.name)
store = Store.get(Store.tid == 2)
print(store.tid, store.name)
This prints the following on my machine:
2 s2
2 s2
from walrus.
Related Issues (20)
- add CachedProperty HOT 1
- cache.cached doesn't work if the function returns None HOT 1
- "lock.event:" pollution HOT 2
- [feature]Any plan for supporting model relationship mapping? HOT 1
- Consumer group pending exception HOT 1
- VSCode type checking can't identify RedisPy's Redis as parent HOT 2
- Database() is falsy when database is empty HOT 2
- Empty queries in graph HOT 1
- A problem with query in graph.py HOT 1
- Lock event keys never expire HOT 1
- There is a problem. HOT 3
- Walrus Support for Redis Python Client 4.x+ HOT 2
- Is Expiring Hashes supported in Walrus? HOT 3
- Missing argument in method calling
- Support from_url database connection HOT 2
- Extending Containers with custom behavior HOT 1
- Not compatible with Redis Python Client 5.0.0 HOT 5
- examples in docs use Python 2 syntax
- Handling json HOT 3
- regex error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from walrus.