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; |
+} |