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

Unified Diff: pkg/gcloud/lib/db/metamodel.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/gcloud/lib/db.dart ('k') | pkg/gcloud/lib/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/gcloud/lib/db/metamodel.dart
diff --git a/pkg/gcloud/lib/db/metamodel.dart b/pkg/gcloud/lib/db/metamodel.dart
new file mode 100644
index 0000000000000000000000000000000000000000..81ff5b766a411e2111ed376990af5b9ad6a975b5
--- /dev/null
+++ b/pkg/gcloud/lib/db/metamodel.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library gcloud.db.meta_model;
+
+import '../db.dart' as db;
+
+@db.Kind(name: '__namespace__')
+class Namespace extends db.ExpandoModel {
+ static const int EmptyNamespaceId = 1;
+
+ String get name {
+ // The default namespace will be reported with id 1.
+ if (id == Namespace.EmptyNamespaceId) return null;
+ return id;
+ }
+}
+
+@db.Kind(name: '__kind__')
+class Kind extends db.Model {
+ String get name => id;
+}
« no previous file with comments | « pkg/gcloud/lib/db.dart ('k') | pkg/gcloud/lib/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698