Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/p/y/pyroonga-0.5.2/pyroonga/odm/table.py   pyroonga(Download)
    def _set_pseudocolumns(cls):
        for attr, name, typ in (('_id', '_id', DataType.UInt32),
                                ('_nsubrecs', '_nsubrecs', DataType.Int32),
                                ('ALL', '*', DataType.ShortText)):
            col = Column(flags=ColumnFlags.COLUMN_SCALAR, type=typ)
            setattr(cls, attr, col)
            cls._setcolumn(name, col)
        if not cls._has_table_no_key():
            cls._key = Column(flags=ColumnFlags.COLUMN_SCALAR,
class pair_query(SuggestTable):
    __tableflags__ = TableFlags.TABLE_HASH_KEY
    __key_type__ = DataType.UInt64
 
    pre = Column(flags=ColumnFlags.COLUMN_SCALAR, type='item_query')
    post = Column(flags=ColumnFlags.COLUMN_SCALAR, type='item_query')
    freq0 = Column(flags=ColumnFlags.COLUMN_SCALAR, type=DataType.Int32)

src/p/y/pyroonga-HEAD/pyroonga/odm/table.py   pyroonga(Download)
                                ('_score', '_score', DataType.Int32),
                                ('ALL', '*', DataType.ShortText)):
            col = Column(flags=ColumnFlags.COLUMN_SCALAR, type=typ)
            setattr(cls, attr, col)
            cls._setcolumn(name, col)
        if not cls._has_table_no_key():
            cls._key = Column(flags=ColumnFlags.COLUMN_SCALAR,
class pair_query(SuggestTable):
    __tableflags__ = TableFlags.TABLE_HASH_KEY
    __key_type__ = DataType.UInt64
 
    pre = Column(flags=ColumnFlags.COLUMN_SCALAR, type='item_query')
    post = Column(flags=ColumnFlags.COLUMN_SCALAR, type='item_query')
    freq0 = Column(flags=ColumnFlags.COLUMN_SCALAR, type=DataType.Int32)

src/p/y/pyroonga-HEAD/pyroonga/tests/unit/odm/test_table.py   pyroonga(Download)
    def test___init___with_default_value(self):
        col = table.Column()
        assert col.flags is a.ColumnFlags.COLUMN_SCALAR
        assert col.type is a.DataType.ShortText
        assert col.__tablemeta__ is table.TableMeta
    def test___str___without_attributes(self):
        col = table.Column(flags=a.ColumnFlags.COLUMN_SCALAR, type=a.DataType.ShortText)
        with pytest.raises(TypeError):
            str(col)
 
    def test___str___without_name(self):
        col = table.Column(flags=a.ColumnFlags.COLUMN_SCALAR, type=a.DataType.ShortText)
    def test___str___without_tablename(self):
        col = table.Column(flags=a.ColumnFlags.COLUMN_SCALAR, type=a.DataType.ShortText)
        col.name = 'name1'
        with pytest.raises(TypeError):
            str(col)

src/p/y/pyroonga-HEAD/pyroonga/tests/functional/odm/test_table.py   pyroonga(Download)
    def test_table(self):
        Table = tablebase()
        namecol = Column(flags=ColumnFlags.COLUMN_SCALAR,
                         type=DataType.ShortText)
        passwordcol = Column(flags=ColumnFlags.COLUMN_SCALAR,
        assert (Table._tables == [Tb1]) is True
 
        sitecol = Column(flags=ColumnFlags.COLUMN_SCALAR,
                         type=DataType.ShortText)
        addresscol = Column(flags=ColumnFlags.COLUMN_SCALAR,
        class Tb1(Table):
            name = Column(flags=ColumnFlags.COLUMN_SCALAR,
                          type=DataType.ShortText)
 
        class Tb2(Table):

src/p/y/pyroonga-0.5.2/pyroonga/tests/unit/odm/test_table.py   pyroonga(Download)
    def test___init___with_default_value(self):
        col = table.Column()
        assert col.flags is a.ColumnFlags.COLUMN_SCALAR
        assert col.type is a.DataType.ShortText
        assert col.__tablemeta__ is table.TableMeta
    def test___str___without_attributes(self):
        col = table.Column(flags=a.ColumnFlags.COLUMN_SCALAR, type=a.DataType.ShortText)
        with pytest.raises(TypeError):
            str(col)
 
    def test___str___without_name(self):
        col = table.Column(flags=a.ColumnFlags.COLUMN_SCALAR, type=a.DataType.ShortText)
    def test___str___without_tablename(self):
        col = table.Column(flags=a.ColumnFlags.COLUMN_SCALAR, type=a.DataType.ShortText)
        col.name = 'name1'
        with pytest.raises(TypeError):
            str(col)

src/p/y/pyroonga-0.5.2/pyroonga/tests/functional/odm/test_table.py   pyroonga(Download)
    def test_table(self):
        Table = tablebase()
        namecol = Column(flags=ColumnFlags.COLUMN_SCALAR,
                         type=DataType.ShortText)
        passwordcol = Column(flags=ColumnFlags.COLUMN_SCALAR,
        assert (Table._tables == [Tb1]) is True
 
        sitecol = Column(flags=ColumnFlags.COLUMN_SCALAR,
                         type=DataType.ShortText)
        addresscol = Column(flags=ColumnFlags.COLUMN_SCALAR,
        class Tb1(Table):
            name = Column(flags=ColumnFlags.COLUMN_SCALAR,
                          type=DataType.ShortText)
 
        class Tb2(Table):