adding casedata
This commit is contained in:
@@ -134,5 +134,46 @@ class AppThread extends BaseAppThread
|
||||
|
||||
return $cant;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves all rows from the APP_THREAD table filtered by app_uid.
|
||||
*
|
||||
* @param string $appUid The unique ID of the application.
|
||||
*
|
||||
* @return array An array of arrays, where each inner array represents a row
|
||||
* from the APP_THREAD table. Returns an empty array if no
|
||||
* rows are found, or throws an exception on error.
|
||||
*
|
||||
* @throws Exception If there is an error during the database query.
|
||||
*/
|
||||
function loadThreadRowsByAppUid(string $appUid): array
|
||||
{
|
||||
try {
|
||||
$con = Propel::getConnection(AppThreadPeer::DATABASE_NAME);
|
||||
|
||||
// Create a new Criteria object.
|
||||
$criteria = new Criteria();
|
||||
|
||||
// Add the condition to filter by app_uid.
|
||||
$criteria->add(AppThreadPeer::APP_UID, $appUid);
|
||||
|
||||
// Retrieve all AppDelegation objects that match the criteria.
|
||||
$appThreads = AppThreadPeer::doSelect($criteria, $con);
|
||||
|
||||
// If no rows are found, return an empty array.
|
||||
if (empty($appThreads)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Convert the Propel objects to arrays.
|
||||
$rows = [];
|
||||
foreach ($appThreads as $appThread) {
|
||||
$rows[] = $appThread->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
}
|
||||
|
||||
return $rows;
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError); // Re-throw the exception to be handled by the caller.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user