diff --git a/package/src/fpsql/__init__.py b/package/src/fpsql/__init__.py index c49c698..a7e8938 100644 --- a/package/src/fpsql/__init__.py +++ b/package/src/fpsql/__init__.py @@ -74,6 +74,19 @@ class sql: None""" self.__table = tableName + def __getitem__(self, name: str) -> Any: + """# Function: sql.__getitem__ + Gets the value of a key + # Inputs: + name: str - The name of the key to retrieve + + # Returns: + Any - If the key exists, return it's value (casted), otherwise, return `None` + + # Raises: + AttributeError - If the table is unset""" + return get(name) + def get(self, name: str) -> Any: """# Function: sql.get Gets the value of a key