Skip to content

Improve API design #15

@HUSSTECH

Description

@HUSSTECH

Not currently fully satisfied with the API design of SQLpy. The pattern of specifying a number as an argument to dictate how many results are returned i.e. sql.QUERY(cursor, 4, args) or sql.Query(cursor, 0, args) is not very python IMHO. Especially specifying 0 for a fetch_all type operation is not clear at all.

Proposal roughly is to add methods i.e. .all(), .one(), .many(n) to be executed on a SQLpy object rather than automatically returning the results of the SQLpy function partial.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions