Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for 22 (0.19 sec)

  1. docs/zh/docs/tutorial/sql-databases.md

    === "Python 3.9+"
    
        ```Python hl_lines="12-20"
        {!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14-22"
        {!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
        ```
    
    !!! info
        我们将`SessionLocal()`请求的创建和处理放在一个`try`块中。
    
        然后我们在finally块中关闭它。
    
        通过这种方式,我们确保数据库会话在请求后始终关闭,即使在处理请求时出现异常也会关闭。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/sql-databases.md

    ### ✍ 🛠️
    
    🛠️ 👥 🔜 🚮 (🔢) 🔜 ✍ 🆕 🇸🇲 `SessionLocal` 🔠 📨, 🚮 ⚫️ 📨 & ⤴️ 🔐 ⚫️ 🕐 📨 🏁.
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="14-22"
        {!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
        ```
    
    === "🐍 3️⃣.9️⃣ & 🔛"
    
        ```Python hl_lines="12-20"
        {!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
        ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 25.2K bytes
    - Viewed (1)
  3. docs/en/docs/tutorial/sql-databases.md

    === "Python 3.9+"
    
        ```Python hl_lines="12-20"
        {!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14-22"
        {!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
        ```
    
    !!! info
        We put the creation of the `SessionLocal()` and handling of the requests in a `try` block.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
Back to top