Skip to content

Commit c4e2836

Browse files
committed
code cleanup
1 parent 9ba49ab commit c4e2836

File tree

12 files changed

+1
-79
lines changed

12 files changed

+1
-79
lines changed

src/Documents/Commands/Batches/BatchCommand.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,6 @@ export class BatchCommand extends RavenCommand<IRavenArrayResult> implements IDi
8989
}
9090

9191
return request;
92-
/* TBD: attachments - TODO: delete me?
93-
94-
if (_attachmentStreams != null && _attachmentStreams.Count > 0)
95-
{
96-
var multipartContent = new MultipartContent {request.Content};
97-
foreach (var stream in _attachmentStreams)
98-
{
99-
PutAttachmentCommandHelper.PrepareStream(stream);
100-
var streamContent = new AttachmentStreamContent(stream, CancellationToken);
101-
streamContent.Headers.TryAddWithoutValidation("Command-Type", "AttachmentStream");
102-
multipartContent.Add(streamContent);
103-
}
104-
request.Content = multipartContent;
105-
}
106-
*/
10792
}
10893

10994
public async setResponseAsync(bodyStream: stream.Stream, fromCache: boolean): Promise<string> {

src/Documents/Commands/MultiGet/GetRequest.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//TODO: fill missing JSDocs?
21
export class GetRequest {
32
private _url: string;
43
private _headers: { [key: string]: string | string[] };

src/Documents/Identity/IHiloIdGenerator.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { DocumentConventions } from "../Conventions/DocumentConventions";
22

33
export interface IHiloIdGenerator {
4-
//TODO ? nextId(...args: Array<object | string | string>): Promise<number>;
54
generateDocumentId(...args: any[]): Promise<string>;
65

76
returnUnusedRange(): Promise<void>;

src/Documents/Indexes/IndexDefinition.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export class IndexDefinition {
2626
public reduce: string;
2727
public fields: { [fieldName: string]: IndexFieldOptions } = {};
2828
public configuration: IndexConfiguration = {};
29-
// TBD 4.1 private boolean testIndex;
3029
public outputReduceToCollection: string;
3130

3231
//TODO: public toJSON() {
@@ -56,10 +55,6 @@ export class IndexDefinition {
5655
return "MapReduce";
5756
}
5857

59-
// TODO remove? TBD 4.1 public boolean isTestIndex()
60-
61-
// TODO remove? TBD 4.1 public void setTestIndex(boolean testIndex)
62-
6358
}
6459

6560
export class IndexDefinitionBuilder {

src/Documents/Session/DocumentQuery.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,6 @@ export class DocumentQuery<T extends object>
517517
query.on("afterQuery", listener as any);
518518
}
519519

520-
/* TODO AfterStreamExecutedCallback = AfterStreamExecutedCallback, should it be implemented?
521-
for: 4.1: query.HighlightedFields = new List<HighlightedField>(HighlightedFields),
522-
query.HighlighterPreTags = HighlighterPreTags,
523-
query.HighlighterPostTags = HighlighterPostTags,
524-
*/
525520
query._disableEntitiesTracking = this._disableEntitiesTracking;
526521
query._disableCaching = this._disableCaching;
527522
// TBD ShowQueryTimings = ShowQueryTimings,

src/Documents/Session/EntityToJson.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export class EntityToJson {
3636
typeInfo = _typeInfo;
3737
}, conventions.knownEntityTypesByName);
3838

39-
// TODO handle Maps
4039
if (entity instanceof SetupDocumentBase) {
4140
jsonNode = entity.toRemoteFieldNames();
4241
} else {

src/Documents/Session/Operations/Lazy/IndexQueryContent.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/Documents/Subscriptions/SubscriptionBatch.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export class SubscriptionBatch<T extends object> {
8585

8686
if (!item.exception) {
8787
instance = curDoc;
88-
//TODO: make sure above assignment is correct when entities has custom casing
8988

9089
if (!StringUtil.isNullOrEmpty(id)) {
9190
this._generateEntityIdOnTheClient.trySetIdentity(instance, id);

src/Mapping/Json/Streams/ObjectKeyCaseTransformStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class ObjectKeyCaseTransformStream extends stream.Transform {
3333
constructor(private _opts: ObjectKeyCaseTransformStreamOptions) {
3434
super({ objectMode: true });
3535

36-
this._opts = Object.assign({}, DEFAULT_OBJECT_KEY_CASE_TRANSFORM_OPTS, this._opts); //TODO:
36+
this._opts = Object.assign({}, DEFAULT_OBJECT_KEY_CASE_TRANSFORM_OPTS, this._opts);
3737
ObjectKeyCaseTransformStream._validateOpts(_opts);
3838

3939
if (typeof _opts.extractIgnorePaths === "function") {

src/ServerWide/Commands/GetClusterTopologyCommand.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ export class GetClusterTopologyCommand extends RavenCommand<ClusterTopologyRespo
2121
return { uri };
2222
}
2323

24-
public setResponse(response: string, fromCache: boolean): void { //TODO: do we need this method?
25-
if (!response) {
26-
this._throwInvalidResponse();
27-
}
28-
29-
const resObj = this._serializer.deserialize<IRavenResponse>(response);
30-
const clusterTpl = Object.assign(new ClusterTopology(), resObj.topology);
31-
this.result = Object.assign(resObj as ClusterTopologyResponse, { topology: clusterTpl });
32-
}
33-
3424
public async setResponseAsync(bodyStream: stream.Stream, fromCache: boolean): Promise<string> {
3525
if (!bodyStream) {
3626
this._throwInvalidResponse();

0 commit comments

Comments
 (0)