Skip to content

Commit 06bd9c3

Browse files
committed
Add missing files
1 parent 0b36b0b commit 06bd9c3

File tree

5 files changed

+1139
-0
lines changed

5 files changed

+1139
-0
lines changed

app/lib/database/model.dart

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'dart:convert' show json;
6+
7+
import 'package:gcloud/service_scope.dart' as ss;
8+
import 'package:json_annotation/json_annotation.dart';
9+
import 'package:meta/meta.dart';
10+
import 'package:pub_dev/shared/exceptions.dart';
11+
import 'package:pub_dev/task/models.dart'
12+
show AbortedTokenInfo, PackageVersionStateInfo;
13+
import 'package:typed_sql/typed_sql.dart';
14+
15+
export 'package:typed_sql/typed_sql.dart' hide AuthenticationException;
16+
17+
part 'model.g.dart';
18+
part 'model.task.dart';
19+
20+
/// Sets the active [database].
21+
void registerDatabase(Database<PrimaryDatabase> value) =>
22+
ss.register(#_database, value);
23+
24+
/// The active [Database<PrimaryDatabase>].
25+
Database<PrimaryDatabase> get database =>
26+
ss.lookup(#_database) as Database<PrimaryDatabase>;
27+
28+
abstract final class PrimaryDatabase extends Schema {
29+
Table<Task> get tasks;
30+
31+
Table<TaskDependency> get taskDependencies;
32+
}

0 commit comments

Comments
 (0)