rewrite: Update data ORM.
Fix parsing bug in Update Query. Fix parsing bug in Insert Query. Add mapping interface to Model. Implement OrderMixin, with ORDER and NULLS Enums. Add `result` field to Query.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import TypeVar, Type, Any, Optional, Generic, Union, Mapping
|
||||
from typing import TypeVar, Type, Optional, Generic, Union
|
||||
# from typing_extensions import Self
|
||||
from weakref import WeakValueDictionary
|
||||
from collections.abc import MutableMapping
|
||||
@@ -170,6 +170,12 @@ class RowModel:
|
||||
def __init__(self, data):
|
||||
self.data = data
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self.data[key]
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
self.data[key] = value
|
||||
|
||||
@classmethod
|
||||
def bind(cls, connector: Connector):
|
||||
if cls.table is None:
|
||||
|
||||
Reference in New Issue
Block a user