MCPcopy Index your code
hub / github.com/clips/pattern / __init__

Method __init__

test/test_db.py:799–806  ·  view source on GitHub ↗
(self, database)

Source from the content-addressed store, hash-verified

797
798 class Products(db.View):
799 def __init__(self, database):
800 db.View.__init__(self, database, "products", schema=[
801 db.pk(),
802 db.field("name", db.STRING),
803 db.field("price", db.FLOAT)
804 ])
805 self.setup()
806 self.table.insert(name="pizza", price=15.0)
807 def render(self, query, **kwargs):
808 q = self.table.search(fields=["name", "price"], filters=[("name", "*%s*" % query)])
809 s = []

Callers

nothing calls this directly

Calls 3

pkMethod · 0.80
setupMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected