Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for KSession (0.15 sec)

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

    ### 创建一个`SessionLocal`类
    
    每个实例`SessionLocal`都会是一个数据库会话。当然该类本身还不是数据库会话。
    
    但是一旦我们创建了一个`SessionLocal`类的实例,这个实例将是实际的数据库会话。
    
    我们命名它是`SessionLocal`为了将它与我们从 SQLAlchemy 导入的`Session`区别开来。
    
    稍后我们将使用`Session`(从 SQLAlchemy 导入的那个)。
    
    要创建`SessionLocal`类,请使用函数`sessionmaker`:
    
    ```Python hl_lines="11"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    ### 创建一个`Base`类
    
    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` 🎓
    
    🔠 👐 `SessionLocal` 🎓 🔜 💽 🎉. 🎓 ⚫️ 🚫 💽 🎉.
    
    ✋️ 🕐 👥 ✍ 👐 `SessionLocal` 🎓, 👉 👐 🔜 ☑ 💽 🎉.
    
    👥 📛 ⚫️ `SessionLocal` 🔬 ⚫️ ⚪️➡️ `Session` 👥 🏭 ⚪️➡️ 🇸🇲.
    
    👥 🔜 ⚙️ `Session` (1️⃣ 🗄 ⚪️➡️ 🇸🇲) ⏪.
    
    ✍ `SessionLocal` 🎓, ⚙️ 🔢 `sessionmaker`:
    
    ```Python hl_lines="11"
    {!../../../docs_src/sql_databases/sql_app/database.py!}
    ```
    
    ### ✍ `Base` 🎓
    
    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

    ### Create a `SessionLocal` class
    
    Each instance of the `SessionLocal` class will be a database session. The class itself is not a database session yet.
    
    But once we create an instance of the `SessionLocal` class, this instance will be the actual database session.
    
    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