Skip to content

Implement type based operator selector #25

@jwp

Description

@jwp

Currently, there is not an easy way to get PG's binary operators' functions for a specific pair of types.

All Python operators can return arbitrary objects. We can take advantage of this by giving Postgres.Type instances operator methods that return the function associated with the corresponding PG operator:

from Postgres.types import int2, int4, int8

map(int2 < int4, [(123,5432100), ...])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions