diff options
author | tschicke-brown <tyler_schicke@brown.edu> | 2019-05-03 20:56:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 20:56:32 -0400 |
commit | 1ccabe155cb4f23c0aa7e37f91cd4a303008b8c7 (patch) | |
tree | 4b93ac202fe813033b6d07f7202ab217c0da79f8 /src/fields/DocumentReference.ts | |
parent | 95d89a193b25d19faf6da0af1412480a36fc9ebe (diff) | |
parent | 070787b6be93dca4a43ec7e893ae4ac4b4d80e59 (diff) |
Merge pull request #92 from browngraphicslab/newDocs
New docs
Diffstat (limited to 'src/fields/DocumentReference.ts')
-rw-r--r-- | src/fields/DocumentReference.ts | 57 |
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 |