我有一个带有计数器类型列的模型,如下所示:
from cqlengine import columns
from cqlengine.models import Model
class CountView(Model):
entryLink=columns.Text(primary_key=True)
visited=columns.Counter()
但是当我想从此模型创建表时,如下所示:
>>> from cqlengine import connection
>>> from cqlengine.management import create_table
>>> from MainAPP.models import CountView
我收到此错误:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "H:/Web-Programming/Python/Project/Prexter\MainAPP\models.py", line 66, in <module>
class CountView(Model):
File "H:/Web-Programming/Python/Project/Prexter\MainAPP\models.py", line 68, in CountView
visited=columns.Counter()
File "H:\Web-Programming\Python\Project\Prexter\Virtual-Environment\Lib\site-packages\cqlengine\columns.py", line 421, in __init__
raise NotImplementedError
NotImplementedError
我怎么了?我必须如何在我的模型中定义一个计数器类型列?请指导我...