Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 449 for commits (0.11 sec)

  1. tests/transaction_test.go

    	user := User{Name: "transaction"}
    	if err := tx.Save(&user).Error; err != nil {
    		t.Fatalf("No error should raise")
    	}
    
    	if err := tx.Commit().Error; err != nil {
    		t.Fatalf("Commit should not raise error")
    	}
    
    	if err := tx.Rollback().Error; err == nil {
    		t.Fatalf("Rollback after commit should raise error")
    	}
    }
    
    func TestTransactionWithSavePoint(t *testing.T) {
    	tx := DB.Begin()
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  2. build-logic/build-init-samples/src/main/kotlin/gradlebuild/samples/SamplesGenerator.kt

            generateReadmeFragment(templateFolder, "$specificContentId-body", settings, comments, descriptor, projectLayoutSetupRegistry)
            if (descriptor.language === Language.JAVA && descriptor.componentType === ComponentType.LIBRARY) {
                generateReadmeFragment(templateFolder, "$specificContentId-api-docs", settings, comments, descriptor, projectLayoutSetupRegistry)
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Oct 22 11:11:17 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  3. docs_src/sql_databases/tutorial001_an.py

    app = FastAPI()
    
    
    @app.on_event("startup")
    def on_startup():
        create_db_and_tables()
    
    
    @app.post("/heroes/")
    def create_hero(hero: Hero, session: SessionDep) -> Hero:
        session.add(hero)
        session.commit()
        session.refresh(hero)
        return hero
    
    
    @app.get("/heroes/")
    def read_heroes(
        session: SessionDep,
        offset: int = 0,
        limit: Annotated[int, Query(le=100)] = 100,
    ) -> List[Hero]:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial002_an_py310.py

            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 664 bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial002_an.py

            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 706 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial001_02_an_py310.py

    
    CommonsDep = Annotated[dict, Depends(common_parameters)]
    
    
    @app.get("/items/")
    async def read_items(commons: CommonsDep):
        return commons
    
    
    @app.get("/users/")
    async def read_users(commons: CommonsDep):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 447 bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md

    O **FastAPI** chama a classe `CommonQueryParams`. Isso cria uma "instância" dessa classe e é a instância que será passada para o parâmetro `commons` na sua função.
    
    ## Anotações de Tipo vs `Depends`
    
    Perceba como escrevemos `CommonQueryParams` duas vezes no código abaixo:
    
    //// tab | Python 3.8+
    
    ```Python
    commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
    ```
    
    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    **FastAPI** calls the `CommonQueryParams` class. This creates an "instance" of that class and the instance will be passed as the parameter `commons` to your function.
    
    ## Type annotation vs `Depends`
    
    Notice how we write `CommonQueryParams` twice in the above code:
    
    //// tab | Python 3.8+
    
    ```Python
    commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
    ```
    
    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  9. cni/pkg/plugin/testdata/custom-uid-tproxy.txt.golden

    -I ISTIO_INBOUND 1 -p tcp -m mark --mark 1337 -j RETURN
    -I ISTIO_INBOUND 2 -p tcp -s 127.0.0.6/32 -i lo -j RETURN
    -I ISTIO_INBOUND 3 -p tcp -i lo -m mark ! --mark 1338 -j RETURN
    COMMIT
    * nat
    -N ISTIO_INBOUND
    -N ISTIO_REDIRECT
    -N ISTIO_IN_REDIRECT
    -N ISTIO_OUTPUT
    -A ISTIO_INBOUND -p tcp --dport 15008 -j RETURN
    -A ISTIO_REDIRECT -p tcp -j REDIRECT --to-ports 15001
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Apr 26 16:39:28 UTC 2023
    - 2K bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial001_02_an_py39.py

    
    CommonsDep = Annotated[dict, Depends(common_parameters)]
    
    
    @app.get("/items/")
    async def read_items(commons: CommonsDep):
        return commons
    
    
    @app.get("/users/")
    async def read_users(commons: CommonsDep):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 466 bytes
    - Viewed (0)
Back to top