Transactd PHP ORM 1.5.0
  • Namespace
  • Class

Namespaces

  • None
  • Transactd
    • boot
      • Laravel

Classes

  • AggregateFunction
  • CachedQueryExecuter
  • Collection
  • CollectionIterator
  • DatabaseManager
  • Model
  • QueryAdapter
  • QueryExecuter
  • Relation
  • TableForwordIterator
  • TableIterator
  • TableReverseIterator

Traits

  • JsonSerializable

Exceptions

  • IOException
  • ModelNotFoundException
  • ModelUserCancelException

Class CachedQueryExecuter

QueryExecuter with cache.

Return from the cache if exists in the cache before reading.

Transactd\QueryExecuter
Extended by Transactd\CachedQueryExecuter
Namespace: Transactd
Located at CachedQueryExecuter.php

Methods summary

public object
# updateCache( object $obj, boolean $clear = false )

Update the cache.

Update the cache.

Parameters

$obj
$clear

Returns

object
public string
# addToCache( object $obj )

Parameters

$obj

Returns

string
Return a cache key.
public
# clear( )

Clear all cache object of this table.

Clear all cache object of this table.

public object|null
# find( mixed $id, boolean $throwException = false )

Parameters

$id
Key values for find.
$throwException

Returns

object|null

Throws

Transactd\ModelNotFoundException

Overrides

Transactd\QueryExecuter::find
public object
# findOrFail( mixed $id )

Parameters

$id
Key values for find.

Returns

object

Throws

Transactd\ModelNotFoundException
public array|Transactd\Collection|BizStation\Transactd\Recordset
# findMany( array $ids, boolean $throwException = false )

Parameters

$ids
$throwException

Returns

array|Transactd\Collection|BizStation\Transactd\Recordset

Throws

InvalidArgumentException

Overrides

Transactd\QueryExecuter::findMany
public object
# first( boolean $throwException = false )

Find a first record by the current conditions.

Find a first record by the current conditions.

Parameters

$throwException
Whether throw an exception that could not be found.

Returns

object

Throws

Transactd\ModelNotFoundException

Overrides

Transactd\QueryExecuter::first
public Transactd\Model
# firstOrFail( )

Returns

Transactd\Model

Throws

Transactd\ModelNotFoundException
public object
# firstOrCreate( array $attributes )

Parameters

$attributes

Returns

object

Throws

Transactd\IOException

Overrides

Transactd\QueryExecuter::firstOrCreate
public object
# firstOrNew( array $attributes )

Parameters

$attributes

Returns

object

Throws

Transactd\IOException

Overrides

Transactd\QueryExecuter::firstOrNew
public object
# refresh( object $obj )

Re-read from the database.

Re-read from the database.

Parameters

$obj

Returns

object

Throws

Transactd\IOException
public object
# create( array $attributes, boolean $nosave = false )

Parameters

$attributes
$nosave

Returns

object

Throws

Transactd\IOException

Overrides

Transactd\QueryExecuter::create
public boolean
# deleteObject( object $obj )

Parameters

$obj

Returns

boolean

Throws

Transactd\IOException

Overrides

Transactd\QueryExecuter::deleteObject
public boolean
# save( object $obj, boolean $forceInsert = false )

Parameters

$obj
$forceInsert

Returns

boolean

Throws

Transactd\IOException

Overrides

Transactd\QueryExecuter::save
public integer|false
# update( array $attributes )

Parameters

$attributes

Returns

integer|false
Return count of array or false.

Throws

Transactd\IOException

Overrides

Transactd\QueryExecuter::update
public integer|false
# delete( )

Returns

integer|false
Return count of array or false.

Throws

Transactd\IOException

Overrides

Transactd\QueryExecuter::delete
public integer
# destroy( integer|string|(int|string)[] $ids )

Parameters

$ids

Returns

integer

Overrides

Transactd\QueryExecuter::destroy
public integer
# deleteMany( array $values, function $func = null )

Delete records by current index's values. NOTE: The current record is changed by this operation.

Delete records by current index's values. NOTE: The current record is changed by this operation.

Parameters

$values
$func
Igonered in this function.

Returns

integer
Number of deleted object.

Overrides

Transactd\QueryExecuter::deleteMany

Methods inherited from Transactd\QueryExecuter

__call(), __construct(), activeTable(), addSelect(), all(), arrayToCollection(), average(), avg(), chunk(), copyKeyValues(), count(), cursor(), direction(), doDelete(), doDestroy(), doUpdate(), get(), getIndexByFieldNames(), getIterator(), getReadbleTable(), getUniqueKey(), getWritableTable(), groupBy(), index(), indexToPrimaryKey(), insert(), isSeekHasMany(), join(), keyFieldNames(), keyValue(), limit(), matchBy(), max(), min(), noBreakReject(), orColumn(), orNotNull(), orNull(), orWhere(), orderBy(), outerJoin(), primaryKeyFieldNames(), primaryKeyFields(), primarykey(), queryDescription(), queryString(), read(), recordset(), reject(), removeNullRecord(), reset(), select(), serverCursor(), setAliases(), setEvent(), setFetchClass(), setKeyValues(), setTimeStampMode(), skip(), sum(), table(), take(), union(), updateConflictCheck(), when(), where(), whereBetween(), whereColumn(), whereIn(), whereInKey(), whereNotBetween(), whereNotIn(), whereNotNull(), whereNull(), with()

Constants summary

Constants inherited from Transactd\QueryExecuter

SEEK_EQUAL, SEEK_FIRST, SEEK_GREATER, SEEK_GREATER_OREQUAL, SEEK_LAST, SEEK_LESSTHAN, SEEK_LESSTHAN_OREQUAL

Properties summary

Properties inherited from Transactd\QueryExecuter

$at, $created, $creating, $dbm, $deleted, $deleting, $keyFieldCache, $keyFieldNameCache, $obj, $primaryKey, $primaryKeyFieldNames, $q, $saved, $saving, $spcoll, $tb, $tbr, $updated, $updating, $with

Transactd PHP ORM 1.5.0 API documentation generated by ApiGen