mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:10:13 +00:00
Split DBStructure & View to avoid DB-calls and dependencies for basic operations
- new "Definition" classes vor DB and Views - new "Writer" classes to create SQL definitions for DB and Views - DBStructure & View are responsible to execute DB-querys
This commit is contained in:
parent
a2c929d128
commit
a910fd8864
30 changed files with 898 additions and 608 deletions
|
@ -23,7 +23,6 @@ namespace Friendica\Model;
|
|||
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\DI;
|
||||
use Friendica\Core\Storage\Exception\InvalidClassStorageException;
|
||||
use Friendica\Core\Storage\Exception\ReferenceStorageException;
|
||||
|
@ -46,7 +45,7 @@ class Attach
|
|||
*/
|
||||
private static function getFields(): array
|
||||
{
|
||||
$allfields = DBStructure::definition(DI::app()->getBasePath(), false);
|
||||
$allfields = DI::dbaDefinition()->getAll();
|
||||
$fields = array_keys($allfields['attach']['fields']);
|
||||
array_splice($fields, array_search('data', $fields), 1);
|
||||
return $fields;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue