Compare commits

...

1 Commits

Author SHA1 Message Date
Tim Van Baak ae5a28fadc tmp 2021-06-02 18:08:56 -07:00
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
"""
Membership query interface
"""
from amanuensis.db import DbContext, ArticleIndex, IndexType
from amanuensis.errors import ArgumentError
def create(
db: DbContext,
lexicon_id: int,
index_type: IndexType,
pattern: str,
logical_order: int,
display_order: int,
capacity: int) -> ArticleIndex:
"""
"""
new_index = ArticleIndex(
lexicon_id=lexicon_id,
index_type=index_type,
pattern=pattern,
logical_order=logical_order,
display_order=display_order,
capacity=capacity,
)
db.session.add(new_index)
db.session.commit()
return new_index

0
tests/test_index.py Normal file
View File