Skip to content

Commit

Permalink
docs: updated TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvandernoord committed Oct 9, 2023
1 parent 218a45e commit 2073c02
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/typedal/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def from_row(self: typing.Type[T_MetaInstance], row: pydal.objects.Row) -> T_Met
return self(row)

def all(self: typing.Type[T_MetaInstance]) -> list[T_MetaInstance]: # noqa: A003
# todo: type?
# todo: Rows instead of list?
return list(self.select())

##########################
Expand All @@ -350,7 +350,7 @@ def insert(self: typing.Type[T_MetaInstance], **fields: Any) -> T_MetaInstance:
return self(result)

def bulk_insert(self: typing.Type[T_MetaInstance], items: list[dict[str, Any]]) -> list[T_MetaInstance]:
# todo: list of instances?
# todo: Rows of instances instead of list?
table = self._ensure_table_defined()
result = table.bulk_insert(items)
return [self(row_id) for row_id in result]
Expand Down Expand Up @@ -426,8 +426,6 @@ def count(self: typing.Type[T_MetaInstance]) -> int:

# todo: first, ... (query builder aliases)

# todo: .belongs etc, check pydal code!

@property
def ALL(cls) -> pydal.objects.SQLALL:
table = cls._ensure_table_defined()
Expand Down Expand Up @@ -744,6 +742,7 @@ class TypedField(typing.Generic[T_Value]):
"""
Typed version of pydal.Field, which will be converted to a normal Field in the background.
"""
# todo: .belongs etc on Field, check pydal code!

# will be set by .bind on db.define
name = ""
Expand Down

0 comments on commit 2073c02

Please sign in to comment.