Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for get_session (0.05 sec)

  1. docs_src/dependencies/tutorial013_an_py310.py

    class User(SQLModel, table=True):
        id: int | None = Field(default=None, primary_key=True)
        name: str
    
    
    app = FastAPI()
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    def get_user(user_id: int, session: Annotated[Session, Depends(get_session)]):
        user = session.get(User, user_id)
        if not user:
            raise HTTPException(status_code=403, detail="Not authorized")
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 03:29:38 UTC 2025
    - 937 bytes
    - Viewed (0)
  2. docs_src/dependencies/tutorial014_an_py310.py

    class User(SQLModel, table=True):
        id: int | None = Field(default=None, primary_key=True)
        name: str
    
    
    app = FastAPI()
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    def get_user(user_id: int, session: Annotated[Session, Depends(get_session)]):
        user = session.get(User, user_id)
        if not user:
            raise HTTPException(status_code=403, detail="Not authorized")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 03:29:38 UTC 2025
    - 957 bytes
    - Viewed (0)
  3. impl/maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java

            defaultLegacySupport.setSession(m1);
    
            MyRunnable myRunnable = new MyRunnable();
            Thread thread = new Thread(myRunnable);
            thread.start();
    
            MavenSession m2 = new MavenSession(null, null, mavenExecutionRequest, null);
            defaultLegacySupport.setSession(m2);
            latch.countDown();
            thread.join();
            assertNull(myRunnable.getSession());
        }
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Fri Jun 06 14:28:57 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  4. impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultLegacySupport.java

            }
        }
    
        @Override
        public MavenSession getSession() {
            AtomicReference<MavenSession> currentSession = DefaultLegacySupport.SESSION.get();
            return currentSession != null ? currentSession.get() : null;
        }
    
        @Override
        public RepositorySystemSession getRepositorySession() {
            MavenSession session = getSession();
            return (session != null) ? session.getRepositorySession() : null;
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Fri Jun 06 14:28:57 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  5. impl/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java

            }
    
            ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(pluginRealm);
    
            MavenSession oldSession = legacySupport.getSession();
    
            scope.enter();
    
            try {
                scope.seed(MavenProject.class, project);
                scope.seed(MojoExecution.class, mojoExecution);
                scope.seed(
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Wed Sep 17 16:01:38 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  6. impl/maven-core/src/main/java/org/apache/maven/DefaultMaven.java

                session.setSession(defaultSessionFactory.newSession(session));
    
                sessionScope.seed(MavenSession.class, session);
                sessionScope.seed(Session.class, session.getSession());
                sessionScope.seed(InternalMavenSession.class, InternalMavenSession.from(session.getSession()));
    
                legacySupport.setSession(session);
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Mon May 05 16:58:52 UTC 2025
    - 28.7K bytes
    - Viewed (1)
  7. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

            this.resourceLoc = resourceLoc;
            this.treeConnection = treeConnection.acquire();
        }
    
        @Override
        public SmbSessionImpl getSession() {
            return this.treeConnection.getSession();
        }
    
        @Override
        public void ensureDFSResolved() throws CIFSException {
            this.treeConnection.ensureDFSResolved(this.resourceLoc);
        }
    
        @Override
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/app/web/login/LoginAction.java

                    messages.addErrorsLoginError(GLOBAL);
                }, validationErrorLambda);
            });
        }
    
        private OptionalThing<HttpSession> getSession() {
            final HttpSession session = request.getSession(false);
            if (session != null) {
                return OptionalEntity.of(session);
            }
            return OptionalEntity.empty();
        }
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Nov 27 07:01:25 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbTreeConnection.java

         *
         * @return session that this file has been loaded through
         */
        @SuppressWarnings("resource")
        public SmbSessionImpl getSession() {
            final SmbTreeImpl t = getTreeInternal();
            if (t != null) {
                return t.getSession();
            }
            return null;
        }
    
        /**
         *
         * Only call this method while holding a tree handle
         *
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 30.4K bytes
    - Viewed (1)
  10. src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java

        }
    
        @Test
        @DisplayName("getSession(): may return null and should be observed as such")
        void getSession_returnsNull() {
            // Arrange
            when(handle.getSession()).thenReturn(null);
    
            // Act
            SmbSession result = handle.getSession();
    
            // Assert
            assertNull(result);
            verify(handle).getSession();
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
Back to top