feat: add group_by to fetch_page (#2140)
--------- Co-authored-by: Pavol Rusnak <pavol@rusnak.io> Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
parent
14519135d8
commit
7ce4eddb0e
4 changed files with 100 additions and 13 deletions
|
|
@ -5,17 +5,23 @@ import random
|
|||
import string
|
||||
import time
|
||||
from subprocess import PIPE, Popen, TimeoutExpired
|
||||
from typing import Tuple
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from loguru import logger
|
||||
from psycopg2 import connect
|
||||
from psycopg2.errors import InvalidCatalogName
|
||||
|
||||
from lnbits import core
|
||||
from lnbits.db import DB_TYPE, POSTGRES
|
||||
from lnbits.db import DB_TYPE, POSTGRES, FromRowModel
|
||||
from lnbits.wallets import get_wallet_class, set_wallet_class
|
||||
|
||||
|
||||
class DbTestModel(FromRowModel):
|
||||
id: int
|
||||
name: str
|
||||
value: Optional[str] = None
|
||||
|
||||
|
||||
def get_random_string(N: int = 10):
|
||||
return "".join(
|
||||
random.SystemRandom().choice(string.ascii_uppercase + string.digits)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue