Overview

Namespaces

  • Alchemy
    • core
      • query
      • schema
    • dialect
    • engine
    • orm
    • tests
    • util
      • promise
  • PHP

Classes

  • DataMapper
  • DDL
  • ManyToOne
  • OneToMany
  • OneToOne
  • ORMQuery
  • ORMTable
  • ORMTableRef
  • RelatedSet
  • Relationship
  • Session
  • SessionSelect
  • WorkQueue
  • Overview
  • Namespace
  • Class
  • Tree

Class SessionSelect

Extension of Monad to allow building a SELECT statement while retaining a reference to the Session you started with

Alchemy\util\Monad
Extended by Alchemy\orm\SessionSelect
Namespace: Alchemy\orm
Located at alchemy/orm/SessionSelect.php
Methods summary
public
# __construct( Alchemy\orm\Session $session, string $mapper )

Object constructor.

Object constructor.

Parameters

$session
Alchemy\orm\Session
$session Session to use for running select
$mapper
string
$mapper DataMapper class to return objects as

Overrides

Alchemy\util\Monad::__construct()
public array
# all( )

Execute the query and return a set of all results

Execute the query and return a set of all results

Returns

array
public Alchemy\orm\DataMapper
# first( )

Return the first result of the query.

Return the first result of the query.

Returns

Alchemy\orm\DataMapper
Query Result
public Alchemy\orm\DataMapper
# one( )

Similar to Alchemy\orm\SessionSelect::first(), but doesn't actually limit the query sent to the database. Instead, the full results of the query are retrieved, and an exception is thrown if there are more than one.

Similar to Alchemy\orm\SessionSelect::first(), but doesn't actually limit the query sent to the database. Instead, the full results of the query are retrieved, and an exception is thrown if there are more than one.

Returns

Alchemy\orm\DataMapper
Query Result
Methods inherited from Alchemy\util\Monad
__call(), __clone(), unwrap()
Properties summary
protected mixed $session
#
protected mixed $mapper
#
Properties inherited from Alchemy\util\Monad
$value
API documentation generated by ApiGen 2.8.0