Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: pkg/gcloud/lib/db.dart

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/gcloud/lib/datastore.dart ('k') | pkg/gcloud/lib/db/metamodel.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, 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 library gcloud.db;
6
7 import 'dart:async';
8 import 'dart:collection';
9 import 'dart:mirrors' as mirrors;
10
11 import 'common.dart' show Page, StreamFromPages;
12 import 'service_scope.dart' as ss;
13 import 'datastore.dart' as datastore;
14
15 part 'src/db/annotations.dart';
16 part 'src/db/db.dart';
17 part 'src/db/models.dart';
18 part 'src/db/model_db.dart';
19 part 'src/db/model_db_impl.dart';
20
21 const Symbol _dbKey = #_gcloud.db;
22
23 /// Access the [DatastoreDB] object available in the current service scope.
24 ///
25 /// The returned object will be the one which was previously registered with
26 /// [registerDbService] within the current (or a parent) service scope.
27 ///
28 /// Accessing this getter outside of a service scope will result in an error.
29 /// See the `package:gcloud/service_scope.dart` library for more information.
30 DatastoreDB get dbService => ss.lookup(_dbKey);
31
32 /// Registers the [DatastoreDB] object within the current service scope.
33 ///
34 /// The provided `db` object will be avilable via the top-level `db` getter.
35 ///
36 /// Calling this function outside of a service scope will result in an error.
37 /// Calling this function more than once inside the same service scope is not
38 /// allowed.
39 void registerDbService(DatastoreDB db) {
40 ss.register(_dbKey, db);
41 }
OLDNEW
« no previous file with comments | « pkg/gcloud/lib/datastore.dart ('k') | pkg/gcloud/lib/db/metamodel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698