aboutsummaryrefslogtreecommitdiff
path: root/src/fields/DocumentReference.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-04-19 07:11:13 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-04-19 07:11:13 -0400
commit3e96161afe4f48afa6abd1b2158b5a1c4fe85a32 (patch)
tree5df06010e7c21d57b653dd832815dee8d0bc5e1d /src/fields/DocumentReference.ts
parentecae4ae106be3e07471208cb93ec0965548d2d12 (diff)
Deleted old fields that have already been reimplemented
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