1

我有一个带有计数器类型列的模型,如下所示:

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

我怎么了?我必须如何在我的模型中定义一个计数器类型列?请指导我...

4

1 回答 1

1

对不起,你遇到了麻烦。我们还没有在 cqlengine 中实现计数器列,但计划在 0.6 版本中添加。

谢谢,

布莱克

于 2013-07-12T01:36:17.137 回答