prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Implement `tables.delete` RPC method
  
  
  </issue>
  <code>
  [start of mathesar/rpc/tables.py]
  1 from typing import Optional, TypedDict
  2 
  3 from modernrpc.core import rpc_method, REQUEST_KEY
  4 from modernrpc.auth.basic import http_basic_auth_login_required
  5 
  6 from db.tables.operations.select import get_table_info
  7 from mathesar.rpc.exceptions.handlers import handle_rpc_exceptions
  8 from mathesar.rpc.utils import connect
  9 
  10 
  11 class TableInfo(TypedDict):
  12     """
  13     Information about a table.
  14 
  15     Attributes:
  16         oid: The `oid` of the table in the schema.
  17         name: The name of the table.
  18         schema: The `oid` of the schema where the table lives.
  19         description: The description of the table.
  20     """
  21     oid: int
  22     name: str
  23     schema: int
  24     description: Optional[str]
  25 
  26 
  27 @rpc_method(name="tables.list")
  28 @http_basic_auth_login_required
  29 @handle_rpc_exceptions
  30 def list_(*, schema_oid: int, database_id: int, **kwargs) -> list[TableInfo]:
  31     """
  32     List information about tables for a schema. Exposed as `list`.
  33 
  34     Args:
  35         schema_oid: Identity of the schema in the user's database.
  36         database_id: The Django id of the database containing the table.
  37 
  38     Returns:
  39         A list of table details.
  40     """
  41     user = kwargs.get(REQUEST_KEY).user
  42     with connect(database_id, user) as conn:
  43         raw_table_info = get_table_info(schema_oid, conn)
  44     return [
  45         TableInfo(tab) for tab in raw_table_info
  46     ]
  47
  [end of mathesar/rpc/tables.py]
  [start of db/tables/operations/drop.py]
  1 from db.connection import execute_msar_func_with_engine
  2 
  3 
  4 def drop_table(name, schema, engine, cascade=False, if_exists=False):
  5     execute_msar_func_with_engine(engine, 'drop_table', schema, name, cascade, if_exists)
  6
  [end of db/tables/operations/drop.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/db/tables/operations/drop.py b/db/tables/operations/drop.py
  --- a/db/tables/operations/drop.py
  +++ b/db/tables/operations/drop.py
  @@ -1,5 +1,21 @@
  -from db.connection import execute_msar_func_with_engine
  +from db.connection import execute_msar_func_with_engine, exec_msar_func
   
   
   def drop_table(name, schema, engine, cascade=False, if_exists=False):
       execute_msar_func_with_engine(engine, 'drop_table', schema, name, cascade, if_exists)
  +
  +
  +def drop_table_from_database(table_oid, conn, cascade=False):
  +    """
  +    Drop a table.
  +
  +    Args:
  +        table_oid: OID of the table to drop.
  +        cascade: Whether to drop the dependent objects.
  +
  +    Returns:
  +        Returns the fully qualified name of the dropped table.
  +    """
  +    return exec_msar_func(
  +        conn, 'drop_table', table_oid, cascade
  +    ).fetchone()[0]
  diff --git a/mathesar/rpc/tables.py b/mathesar/rpc/tables.py
  --- a/mathesar/rpc/tables.py
  +++ b/mathesar/rpc/tables.py
  @@ -4,6 +4,7 @@
   from modernrpc.auth.basic import http_basic_auth_login_required
   
   from db.tables.operations.select import get_table_info
  +from db.tables.operations.drop import drop_table_from_database
   from mathesar.rpc.exceptions.handlers import handle_rpc_exceptions
   from mathesar.rpc.utils import connect
   
  @@ -44,3 +45,25 @@
       return [
           TableInfo(tab) for tab in raw_table_info
       ]
  +
  +
  +@rpc_method(name="tables.delete")
  +@http_basic_auth_login_required
  +@handle_rpc_exceptions
  +def delete(
  +    *, table_oid: int, database_id: int, cascade: bool = False, **kwargs
  +) -> str:
  +    """
  +    Delete a table from a schema.
  +
  +    Args:
  +        table_oid: Identity of the table in the user's database.
  +        database_id: The Django id of the database containing the table.
  +        cascade: Whether to drop the dependent objects.
  +
  +    Returns:
  +        The name of the dropped table.
  +    """
  +    user = kwargs.get(REQUEST_KEY).user
  +    with connect(database_id, user) as conn:
  +        return drop_table_from_database(table_oid, conn, cascade)
  
verification_info: {"golden_diff": "diff --git a/db/tables/operations/drop.py b/db/tables/operations/drop.py\n--- a/db/tables/operations/drop.py\n+++ b/db/tables/operations/drop.py\n@@ -1,5 +1,21 @@\n-from db.connection import execute_msar_func_with_engine\n+from db.connection import execute_msar_func_with_engine, exec_msar_func\n \n \n def drop_table(name, schema, engine, cascade=False, if_exists=False):\n     execute_msar_func_with_engine(engine, 'drop_table', schema, name, cascade, if_exists)\n+\n+\n+def drop_table_from_database(table_oid, conn, cascade=False):\n+    \"\"\"\n+    Drop a table.\n+\n+    Args:\n+        table_oid: OID of the table to drop.\n+        cascade: Whether to drop the dependent objects.\n+\n+    Returns:\n+        Returns the fully qualified name of the dropped table.\n+    \"\"\"\n+    return exec_msar_func(\n+        conn, 'drop_table', table_oid, cascade\n+    ).fetchone()[0]\ndiff --git a/mathesar/rpc/tables.py b/mathesar/rpc/tables.py\n--- a/mathesar/rpc/tables.py\n+++ b/mathesar/rpc/tables.py\n@@ -4,6 +4,7 @@\n from modernrpc.auth.basic import http_basic_auth_login_required\n \n from db.tables.operations.select import get_table_info\n+from db.tables.operations.drop import drop_table_from_database\n from mathesar.rpc.exceptions.handlers import handle_rpc_exceptions\n from mathesar.rpc.utils import connect\n \n@@ -44,3 +45,25 @@\n     return [\n         TableInfo(tab) for tab in raw_table_info\n     ]\n+\n+\n+@rpc_method(name=\"tables.delete\")\n+@http_basic_auth_login_required\n+@handle_rpc_exceptions\n+def delete(\n+    *, table_oid: int, database_id: int, cascade: bool = False, **kwargs\n+) -> str:\n+    \"\"\"\n+    Delete a table from a schema.\n+\n+    Args:\n+        table_oid: Identity of the table in the user's database.\n+        database_id: The Django id of the database containing the table.\n+        cascade: Whether to drop the dependent objects.\n+\n+    Returns:\n+        The name of the dropped table.\n+    \"\"\"\n+    user = kwargs.get(REQUEST_KEY).user\n+    with connect(database_id, user) as conn:\n+        return drop_table_from_database(table_oid, conn, cascade)\n", "issue": "Implement `tables.delete` RPC method\n\n", "before_files": [{"content": "from typing import Optional, TypedDict\n\nfrom modernrpc.core import rpc_method, REQUEST_KEY\nfrom modernrpc.auth.basic import http_basic_auth_login_required\n\nfrom db.tables.operations.select import get_table_info\nfrom mathesar.rpc.exceptions.handlers import handle_rpc_exceptions\nfrom mathesar.rpc.utils import connect\n\n\nclass TableInfo(TypedDict):\n    \"\"\"\n    Information about a table.\n\n    Attributes:\n        oid: The `oid` of the table in the schema.\n        name: The name of the table.\n        schema: The `oid` of the schema where the table lives.\n        description: The description of the table.\n    \"\"\"\n    oid: int\n    name: str\n    schema: int\n    description: Optional[str]\n\n\n@rpc_method(name=\"tables.list\")\n@http_basic_auth_login_required\n@handle_rpc_exceptions\ndef list_(*, schema_oid: int, database_id: int, **kwargs) -> list[TableInfo]:\n    \"\"\"\n    List information about tables for a schema. Exposed as `list`.\n\n    Args:\n        schema_oid: Identity of the schema in the user's database.\n        database_id: The Django id of the database containing the table.\n\n    Returns:\n        A list of table details.\n    \"\"\"\n    user = kwargs.get(REQUEST_KEY).user\n    with connect(database_id, user) as conn:\n        raw_table_info = get_table_info(schema_oid, conn)\n    return [\n        TableInfo(tab) for tab in raw_table_info\n    ]\n", "path": "mathesar/rpc/tables.py"}, {"content": "from db.connection import execute_msar_func_with_engine\n\n\ndef drop_table(name, schema, engine, cascade=False, if_exists=False):\n    execute_msar_func_with_engine(engine, 'drop_table', schema, name, cascade, if_exists)\n", "path": "db/tables/operations/drop.py"}]}