aboutsummaryrefslogtreecommitdiff
path: root/src/fields/DocumentReference.ts
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-05-09 20:59:10 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-05-09 20:59:10 -0400
commit47ecf8d30f4aa5e25a659fc7f3c0c1487420150e (patch)
treecbae92b4aca6cc8427410cc2ec51b0afff1d8ea2 /src/fields/DocumentReference.ts
parentff5e275d4d9bb17866a432459884274cd870a640 (diff)
merge with master, but haven't reconciled internal and external linking
Diffstat (limited to 'src/fields/DocumentReference.ts')
-rw-r--r--src/fields/DocumentReference.ts57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/fields/DocumentReference.ts b/src/fields/DocumentReference.ts
deleted file mode 100644
index 303754177..000000000
--- a/src/fields/DocumentReference.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import { Field, Opt, FieldValue, FieldId } from "./Field";
-import { Document } from "./Document";
-import { Key } from "./Key";
-import { Types } from "../server/Message";
-import { ObjectID } from "bson";
-
-export class DocumentReference extends Field {
- get Key(): Key {
- return this.key;
- }
-
- get Document(): Document {
- return this.document;
- }
-
- constructor(private document: Document, private key: Key) {
- super();
- }
-
- UpdateFromServer() {
-
- }
-
- Dereference(): FieldValue<Field> {
- return this.document.Get(this.key);
- }
-
- DereferenceToRoot(): FieldValue<Field> {
- let field: FieldValue<Field> = this;
- while (field instanceof DocumentReference) {
- field = field.Dereference();
- }
- return field;
- }
-
- TrySetValue(value: any): boolean {
- throw new Error("Method not implemented.");
- }
- GetValue() {
- throw new Error("Method not implemented.");
- }
- Copy(): Field {
- throw new Error("Method not implemented.");
- }
-
- ToScriptString(): string {
- return "";
- }
-
- ToJson() {
- return {
- type: Types.DocumentReference,
- data: this.document.Id,
- id: this.Id
- };
- }
-} \ No newline at end of file