- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 116 for get_db (0.16 sec)
-
docs/em/docs/how-to/sql-databases-peewee.md
๐, ๐ฅ ๐ช โ โ1๏ธโฃ `async` ๐ `reset_db_state()` ๐ โ๏ธ ๐ง-๐ `get_db()`. โซ๏ธ ๐ โ ๐ฒ ๐ ๐ข (โฎ๏ธ ๐ข `dict`) ๐ ๐ โ๏ธ ๐ฝ ๐ต๐ธ ๐ ๐จ. & โคด๏ธ ๐ `get_db()` ๐ ๐ช โซ๏ธ ๐ฝ ๐ต๐ธ (๐, ๐ต, โ๏ธ). ```Python hl_lines="18-20" {!../../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` **โญ ๐จ**, ๐ฅ ๐ โฒ ๐ ๐ ๐ข ๐ `async` ๐ `reset_db_state()` & โคด๏ธ โ ๐ ๐ `get_db()` ๐, ๐ ๐ ๐จ ๐ โ๏ธ ๐ฎ ๐ ๐ฝ ๐ต๐ธ (๐, ๐ต, โ๏ธ). !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 19.2K bytes - Viewed (0) -
docs/en/docs/how-to/sql-databases-peewee.md
For that, we need to create another `async` dependency `reset_db_state()` that is used as a sub-dependency in `get_db()`. It will set the value for the context variable (with just a default `dict`) that will be used as the database state for the whole request. And then the dependency `get_db()` will store in it the database state (connection, transactions, etc). ```Python hl_lines="18-20"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 16 13:23:25 GMT 2024 - 23.6K bytes - Viewed (1) -
docs/en/docs/tutorial/sql-databases.md
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) -
docs/zh/docs/tutorial/sql-databases.md
``` ็ถๅๆไปฌๅบ่ฏฅๅฃฐๆ*่ทฏๅพๆไฝๅฝๆฐ*ๅไธๅธฆ ็ไพ่ตๅ ณ็ณป`async def`๏ผๅช้ไฝฟ็จๆฎ้็`def`๏ผๅฆไธ๏ผ ```Python hl_lines="2" @app.get("/users/{user_id}", response_model=schemas.User) def read_user(user_id: int, db: Session = Depends(get_db)): db_user = crud.get_user(db, user_id=user_id) ... ``` !!! info ๅฆๆๆจ้่ฆๅผๆญฅ่ฟๆฅๅฐๅ ณ็ณปๆฐๆฎๅบ๏ผ่ฏทๅ้ [Async SQL (Relational) Databases](https://fastapi.tiangolo.com/zh/advanced/async-sql-databases/)
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) -
docs/em/docs/tutorial/sql-databases.md
``` โคด๏ธ ๐ฅ ๐ ๐ฃ *โก ๐ ๏ธ ๐ข* & ๐ ๐ต `async def`, โฎ๏ธ ๐ `def`,: ```Python hl_lines="2" @app.get("/users/{user_id}", response_model=schemas.User) def read_user(user_id: int, db: Session = Depends(get_db)): db_user = crud.get_user(db, user_id=user_id) ... ``` !!! info ๐ฅ ๐ ๐ช ๐ ๐ ๐ ๐ฝ ๐, ๐ [๐ ๐ (๐) ๐ฝ](../advanced/async-sql-databases.md){.internal-link target=_blank}.
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) -
maven-core/src/main/java/org/apache/maven/settings/SettingsUtilsV4.java
profile.id(modelProfile.getId()); org.apache.maven.api.model.Activation modelActivation = modelProfile.getActivation(); if (modelActivation != null) { Activation.Builder activation = Activation.newBuilder(); activation.activeByDefault(modelActivation.isActiveByDefault()); activation.jdk(modelActivation.getJdk());
Java - Registered: Sun Mar 24 03:35:10 GMT 2024 - Last Modified: Thu Feb 15 08:42:00 GMT 2024 - 13.8K bytes - Viewed (0) -
maven-api-impl/src/main/java/org/apache/maven/internal/impl/SettingsUtilsV4.java
profile.id(modelProfile.getId()); org.apache.maven.api.model.Activation modelActivation = modelProfile.getActivation(); if (modelActivation != null) { Activation.Builder activation = Activation.newBuilder(); activation.activeByDefault(modelActivation.isActiveByDefault()); activation.jdk(modelActivation.getJdk());
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Mon Mar 25 10:50:01 GMT 2024 - 13.4K bytes - Viewed (0) -
src/test/java/org/codelibs/core/beans/util/BeanUtilTest.java
dest.setBbb("bbb"); dest.setDdd("ddd"); BeanUtil.copyBeanToBean(src, dest); assertThat(dest.getAaa(), is("111")); assertThat(dest.getBbb(), is(nullValue())); assertThat(dest.getDdd(), is("ddd")); } /** * @throws Exception */ @Test public void testCopy_BeanToBean_ExcludeNull() throws Exception { final MyClass src = new MyClass();
Java - Registered: Fri May 03 20:58:11 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 34.5K bytes - Viewed (0) -
maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultSettingsValidator.java
validateBannedCharacters( problems, prefix + ".id", BuilderProblem.Severity.WARNING, repository.getId(), null, ILLEGAL_REPO_ID_CHARS); if ("local".equals(repository.getId())) { addViolation(
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Mon Mar 25 10:50:01 GMT 2024 - 13.7K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb1/SMB1SigningDigest.java
this.digest = Crypto.getMD5(); this.macSigningKey = macSigningKey; } /** * Construct a digest with a non-zero starting sequence number * * @param macSigningKey * @param initialSequence */ public SMB1SigningDigest ( byte[] macSigningKey, int initialSequence ) { this.digest = Crypto.getMD5(); this.macSigningKey = macSigningKey;
Java - Registered: Sun May 05 00:10:10 GMT 2024 - Last Modified: Sun Aug 05 09:45:59 GMT 2018 - 10.6K bytes - Viewed (0)