Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

database list_documents() and query() pagination missing #5

Open
@dstpierre

Description

@dstpierre

The two functions accept the pagination data but do not provide them to the URL.

They should be provided as query strings i.e.:

/db/repo?page=1&size=25&desc=true

In the Go library the desc=true is added only when the user wants to sort descending order.

It might be better to accept a defined type (I guess class in Python?), for example there's a new sortby field that's in the work and it will be easier to change for further version vs. function parameters. For example

class ListParams:
    page: int
    size: int
    desc: bool

def list_documents(self, repo, lp: ListParams)

This will prevent breaking caller code and give flexibility to allow for additional meta data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions