Home
last modified time | relevance | path

Searched refs:DB (Results 1 – 25 of 160) sorted by relevance

1234567

/webtrees/app/Http/RequestHandlers/
H A DRenumberTreeAction.php23 use Fisharebest\Webtrees\DB; alias
78 DB::table('individuals')
86 DB::table('families')
94 DB::table('families')
104 DB::table('families')
120 DB::table('individuals')
134 DB::table('placelinks')
141 DB::table('dates')
148 DB::table('user_gedcom_setting')
158 DB::table('families')
[all …]
H A DGedcomLoad.php23 use Fisharebest\Webtrees\DB; alias
79 $import_offset = DB::table('gedcom_chunk')
84 $import_total = DB::table('gedcom_chunk')
103 'individuals' => DB::table('individuals')->where('i_file', '=', $tree->id()),
104 'families' => DB::table('families')->where('f_file', '=', $tree->id()),
105 'sources' => DB::table('sources')->where('s_file', '=', $tree->id()),
106 'other' => DB::table('other')->where('o_file', '=', $tree->id()),
107 'places' => DB::table('places')->where('p_file', '=', $tree->id()),
108 'placelinks' => DB::table('placelinks')->where('pl_file', '=', $tree->id()),
109 'name' => DB::table('name')->where('n_file', '=', $tree->id()),
[all …]
H A DMergeTreesAction.php22 use Fisharebest\Webtrees\DB; alias
72 DB::query()->from('individuals')->insertUsing([
89 DB::query()->from('families')->insertUsing([
108 DB::query()->from('sources')->insertUsing([
123 DB::query()->from('media')->insertUsing([
136 DB::query()->from('media_file')->insertUsing([
155 DB::query()->from('other')->insertUsing([
171 DB::query()->from('name')->insertUsing([
204 DB::query()->from('dates')->insertUsing([
231 DB::query()->from('link')->insertUsing([
H A DSetupWizard.php28 use Fisharebest\Webtrees\DB; alias
66 private const string DEFAULT_DBTYPE = DB::MYSQL;
89 DB::MYSQL => '3306',
90 DB::POSTGRES => '5432',
91 DB::SQLITE => '',
92 DB::SQL_SERVER => '', // Do not use default, as it is valid to have no port number.
442 case DB::SQLITE:
446 case DB::MYSQL:
447 DB::connect(
460DB::exec('CREATE DATABASE IF NOT EXISTS `' . $data['dbname'] . '` COLLATE utf8mb4_unicode_ci');
[all …]
/webtrees/app/Services/
H A DAdminService.php22 use Fisharebest\Webtrees\DB; alias
65 $subquery1 = DB::table('individuals')
68 ->union(DB::table('families')
71 ->union(DB::table('sources')
74 ->union(DB::table('media')
77 ->union(DB::table('other')
82 $subquery2 = DB::table('change')
85 ->union(DB::table('individuals')
88 ->union(DB::table('families')
91 ->union(DB::table('sources')
[all …]
H A DTreeService.php25 use Fisharebest\Webtrees\DB; alias
81 $query = DB::table('gedcom')
176 DB::table('gedcom')->insert([
180 $tree_id = DB::lastInsertId();
188 DB::query()->from('gedcom_setting')->insertUsing(
198 DB::query()->from('default_resn')->insertUsing(
250 DB::table('gedcom_chunk')->where('gedcom_id', '=', $tree->id())->delete();
262 DB::table('gedcom_chunk')->insert([
271 DB::table('gedcom_chunk')->insert([
289 DB::table('gedcom_chunk')->where('gedcom_id', '=', $tree->id())->delete();
[all …]
H A DUserService.php25 use Fisharebest\Webtrees\DB; alias
51 ->remember('user-' . $user_id, static fn (): User|null => DB::table('user')
63 return DB::table('user')
75 return DB::table('user')
92 return DB::table('user')
107 return DB::table('user')
125 return DB::table('user')
173 return DB::table('user')
187 return DB::table('user')
205 return DB::table('user')
[all …]
H A DSearchService.php24 use Fisharebest\Webtrees\DB; alias
90 $query = DB::table('families');
115 $query = DB::table('families')
129 $prefix = DB::prefix();
150 return DB::table('families')
173 $query = DB::table('individuals');
198 $query = DB::table('individuals')
220 return DB::table('individuals')
247 $query = DB::table('other')
268 $query = DB::table('media');
[all …]
H A DGedcomImportService.php23 use Fisharebest\Webtrees\DB; alias
288 $old_linked_media = DB::table('link')
295 DB::table('link')
323 DB::table('individuals')->insert([
353 DB::table('families')->insert([
376 DB::table('sources')->insert([
389 DB::table('other')->insert([
404 DB::table('other')->insert([
415 DB::table('media')->insert([
422 DB::table('media_file')->insert([
[all …]
H A DHomePageService.php24 use Fisharebest\Webtrees\DB; alias
63 $block = DB::table('block')
92 $block = DB::table('block')
121 $module_name = DB::table('block')
175 $rows = DB::table('block')
191 $has_blocks = DB::table('block')
202 DB::table('block')->insert([
225 $rows = DB::table('block')
241 $has_blocks = DB::table('block')
252 DB::table('block')->insert([
[all …]
H A DMapDataService.php22 use Fisharebest\Webtrees\DB; alias
58 $row = DB::table('place_location')
84 $rows = DB::table('places')
106 $all_places = DB::table('places AS p0')
129 $all_locations = DB::table('place_location AS p0')
167 DB::table('place_location')
181 $location_query = DB::table('place_location')
184 $location_query = DB::table('place_location')
189 $places = DB::table('places')
197 DB::table('place_location')
[all …]
H A DPendingChangesService.php27 use Fisharebest\Webtrees\DB; alias
74 return DB::table('change')
92 $rows = DB::table('change')
145 $changes = DB::table('change')
162 DB::table('change')
175 $changes = DB::table('change')
192 DB::table('change')
206 $changes = DB::table('change')
223 DB::table('change')
236 DB::table('change')
[all …]
H A DLinkedRecordService.php22 use Fisharebest\Webtrees\DB; alias
56 $union = DB::table('change')
70 $xrefs = DB::table('link')
90 $query = DB::table('families')
121 $query = DB::table('individuals')
151 return DB::table('other')
176 return DB::table('media')
200 return DB::table('other')
225 return DB::table('other')
250 return DB::table('sources')
[all …]
/webtrees/app/Schema/
H A DMigration44.php22 use Fisharebest\Webtrees\DB; alias
36 if (!DB::schema()->hasTable('place_location')) {
37 DB::schema()->create('place_location', static function (Blueprint $table): void {
53 if (DB::driverName() === DB::SQL_SERVER) {
60DB::schema()->table('place_location', static function (Blueprint $table) use ($action): void {
71 if (DB::schema()->hasTable('placelocation')) {
72 if (DB::driverName() === DB::MYSQL) {
73 DB::table('placelocation')
82 DB::table('placelocation AS pl1')
90 DB::table('placelocation')
[all …]
H A DMigration0.php22 use Fisharebest\Webtrees\DB; alias
32 DB::schema()->create('gedcom', static function (Blueprint $table): void {
41 DB::schema()->create('site_setting', static function (Blueprint $table): void {
48 DB::schema()->create('gedcom_setting', static function (Blueprint $table): void {
58 DB::schema()->create('user', static function (Blueprint $table): void {
69 DB::schema()->create('user_setting', static function (Blueprint $table): void {
79 DB::schema()->create('user_gedcom_setting', static function (Blueprint $table): void {
86 $key = DB::prefix($table->getTable() . '_primary');
95 DB::schema()->create('log', static function (Blueprint $table): void {
114 DB::schema()->create('change', static function (Blueprint $table): void {
[all …]
H A DMigration37.php22 use Fisharebest\Webtrees\DB; alias
35 DB::schema()->dropIfExists('site_access_rule');
36 DB::schema()->dropIfExists('next_id');
40 if (!DB::schema()->hasTable('media_file')) {
41 DB::schema()->create('media_file', static function (Blueprint $table): void {
59 … if (DB::table('media_file')->count() === 0 && DB::schema()->hasColumn('media', 'm_filename')) {
60 (new Builder(DB::connection()))->from('media_file')->insertUsing([
69 $substring_function = DB::driverName() === DB::SQLITE ? 'SUBSTR' : 'SUBSTRING';
82 DB::schema()->table('media', static function (Blueprint $table): void {
85 DB::schema()->table('media', static function (Blueprint $table): void {
[all …]
H A DSeedGedcomTable.php22 use Fisharebest\Webtrees\DB; alias
38 if (DB::driverName() === DB::SQL_SERVER) {
39 DB::exec('SET IDENTITY_INSERT [' . DB::prefix() . 'gedcom] ON');
42 DB::table('gedcom')->updateOrInsert([
48 if (DB::driverName() === DB::SQL_SERVER) {
49 DB::exec('SET IDENTITY_INSERT [' . DB::prefix() . 'gedcom] OFF');
H A DSeedUserTable.php22 use Fisharebest\Webtrees\DB; alias
38 if (DB::driverName() === DB::SQL_SERVER) {
39 DB::exec('SET IDENTITY_INSERT [' . DB::prefix() . 'user] ON');
42 DB::table('user')->updateOrInsert([
51 if (DB::driverName() === DB::SQL_SERVER) {
52 DB::exec('SET IDENTITY_INSERT [' . DB::prefix() . 'user] OFF');
H A DMigration42.php22 use Fisharebest\Webtrees\DB; alias
52 $data = DB::table('module_privacy')->get();
54 DB::schema()->drop('module_privacy');
56 DB::schema()->create('module_privacy', static function (Blueprint $table): void {
64 $key1 = DB::prefix($table->getTable() . '_ix1');
65 $key2 = DB::prefix($table->getTable() . '_ix2');
75 DB::table('module_privacy')->insert([
/webtrees/app/Statistics/Repository/
H A DFamilyRepository.php23 use Fisharebest\Webtrees\DB; alias
83 $row = DB::table('families')
150 return DB::table('families')
226 return DB::table('families')
251 $families = DB::table('families')
306 return DB::table('link AS link1')
330 …k1.l_to AS ch1', 'link2.l_to AS ch2', new Expression(DB::prefix('child2.d_julianday2') . ' - ' . D…
559 $query = DB::table('families')
597 $total = (int) DB::table('families')
611 $average = (float) DB::table('families')
[all …]
H A DIndividualRepository.php23 use Fisharebest\Webtrees\DB; alias
100 $query = DB::table('name')
451 $query = DB::table('name')
479 $query = DB::table('name')
505 $top_surnames = DB::table('name')
522 $surnames[$top_surname] = DB::table('name')
684 $query = DB::table('dates')
742 $query = DB::table('dates')
817 …->select([new Expression(DB::prefix('death.d_julianday2') . ' - ' . DB::prefix('birth.d_julianday1…
845 …->select(['individuals.*', new Expression(DB::prefix('death.d_julianday2') . ' - ' . DB::prefix('b…
[all …]
/webtrees/app/Module/
H A DFrequentlyAskedQuestionsModule.php22 use Fisharebest\Webtrees\DB; alias
135 $min_block_order = (int) DB::table('block')
144 $max_block_order = (int) DB::table('block')
190 DB::table('block_setting')->where('block_id', '=', $block_id)->delete();
192 DB::table('block')->where('block_id', '=', $block_id)->delete();
211 $block_order = DB::table('block')
215 $swap_block = DB::table('block')
222 DB::table('block')
228 DB::table('block')
247 $block_order = DB::table('block')
[all …]
H A DSiteMapModule.php24 use Fisharebest\Webtrees\DB; alias
199 $count_families = DB::table('families')
205 $count_individuals = DB::table('individuals')
211 $count_media = DB::table('media')
217 $count_notes = DB::table('other')
224 $count_repositories = DB::table('other')
231 $count_sources = DB::table('sources')
237 $count_submitters = DB::table('other')
245 DB::table('module_setting')
360 return DB::table('families')
[all …]
/webtrees/app/Statistics/Google/
H A DChartMarriageAge.php22 use Fisharebest\Webtrees\DB; alias
59 $male = DB::table('dates as married')
61 …new Expression('AVG(' . DB::prefix('married.d_julianday2') . ' - ' . DB::prefix('birth.d_julianday…
62 … new Expression('ROUND((' . DB::prefix('married.d_year') . ' + 49) / 100, 0) AS century'),
76 ->where('married.d_julianday1', '>', new Expression(DB::prefix('birth.d_julianday1')))
82 $female = DB::table('dates as married')
84 …new Expression('ROUND(AVG(' . DB::prefix('married.d_julianday2') . ' - ' . DB::prefix('birth.d_jul…
85 … new Expression('ROUND((' . DB::prefix('married.d_year') . ' + 49) / 100, 0) AS century'),
99 ->where('married.d_julianday1', '>', new Expression(DB::prefix('birth.d_julianday1')))
/webtrees/app/Factories/
H A DXrefFactory.php23 use Fisharebest\Webtrees\DB; alias
52 $num = (int) DB::table('site_setting')
70 DB::table('individuals')->where('i_id', '=', $xref)->exists() ||
71 DB::table('families')->where('f_id', '=', $xref)->exists() ||
72 DB::table('sources')->where('s_id', '=', $xref)->exists() ||
73 DB::table('media')->where('m_id', '=', $xref)->exists() ||
74 DB::table('other')->where('o_id', '=', $xref)->exists() ||
75 DB::table('change')->where('xref', '=', $xref)->exists();

1234567