Skip to content

Commit

Permalink
Rebase again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Viatorus committed Jul 11, 2018
1 parent 2a69553 commit a300130
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 56 deletions.
4 changes: 2 additions & 2 deletions packages/common/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @hidden
*/
import {Loki} from "../loki/src";
import {Serialization} from "../loki/src/serialization/migration";
import { Loki } from "../loki/src";
import { Serialization } from "../loki/src/serialization/migration";

export interface StorageAdapter {
loadDatabase(dbname: string): Promise<string | Loki | Serialization.Serialized>;
Expand Down
16 changes: 8 additions & 8 deletions packages/full-text-search/src/full_text_search.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {InvertedIndex} from "./inverted_index";
import {IndexSearcher} from "./index_searcher";
import {Dict} from "../../common/types";
import {PLUGINS} from "../../common/plugin";
import {Query} from "./query_types";
import {Scorer} from "./scorer";
import {Analyzer} from "./analyzer/analyzer";
import {Serialization} from "../../loki/src/serialization/migration";
import { InvertedIndex } from "./inverted_index";
import { IndexSearcher } from "./index_searcher";
import { Dict } from "../../common/types";
import { PLUGINS } from "../../common/plugin";
import { Query } from "./query_types";
import { Scorer } from "./scorer";
import { Analyzer } from "./analyzer/analyzer";
import { Serialization } from "../../loki/src/serialization/migration";

export class FullTextSearch {
/// The id field of each document.
Expand Down
4 changes: 2 additions & 2 deletions packages/full-text-search/src/inverted_index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Analyzer, StandardAnalyzer, analyze} from "./analyzer/analyzer";
import {Serialization} from "../../loki/src/serialization/migration";
import { Analyzer, StandardAnalyzer, analyze } from "./analyzer/analyzer";
import { Serialization } from "../../loki/src/serialization/migration";

/**
* Converts a string into an array of code points.
Expand Down
4 changes: 2 additions & 2 deletions packages/loki/spec/generic/migration.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Loki} from "../../src/loki";
import {Serialization, mergeRightBiasedWithProxy} from "../../src/serialization/migration";
import { Loki } from "../../src/loki";
import { Serialization, mergeRightBiasedWithProxy } from "../../src/serialization/migration";

declare var require: (moduleId: string) => any;
const loki = require("../../../lokijs/lokijs.js");
Expand Down
6 changes: 3 additions & 3 deletions packages/loki/spec/generic/typed.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global describe, it, expect */
import {Loki} from "../../src/loki";
import {Doc} from "../../../common/types";
import {Serialization} from "../../src/serialization/migration";
import { Loki } from "../../src/loki";
import { Doc } from "../../../common/types";
import { Serialization } from "../../src/serialization/migration";

describe("typed", () => {
it("works", () => {
Expand Down
22 changes: 11 additions & 11 deletions packages/loki/src/collection.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {LokiEventEmitter} from "./event_emitter";
import {UniqueIndex} from "./unique_index";
import {ResultSet, LokiOps} from "./result_set";
import {DynamicView} from "./dynamic_view";
import {ltHelper, gtHelper, aeqHelper} from "./helper";
import {clone, CloneMethod} from "./clone";
import {Doc, Dict} from "../../common/types";
import {FullTextSearch} from "../../full-text-search/src/full_text_search";
import {PLUGINS} from "../../common/plugin";
import {Analyzer} from "../../full-text-search/src/analyzer/analyzer";
import {Serialization} from "./serialization/migration";
import { LokiEventEmitter } from "./event_emitter";
import { UniqueIndex } from "./unique_index";
import { ResultSet, LokiOps } from "./result_set";
import { DynamicView } from "./dynamic_view";
import { ltHelper, gtHelper, aeqHelper } from "./helper";
import { clone, CloneMethod } from "./clone";
import { Doc, Dict } from "../../common/types";
import { FullTextSearch } from "../../full-text-search/src/full_text_search";
import { PLUGINS } from "../../common/plugin";
import { Analyzer } from "../../full-text-search/src/analyzer/analyzer";
import { Serialization } from "./serialization/migration";

export {CloneMethod} from "./clone";

Expand Down
12 changes: 6 additions & 6 deletions packages/loki/src/dynamic_view.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {LokiEventEmitter} from "./event_emitter";
import {ResultSet} from "./result_set";
import {Collection} from "./collection";
import {Doc} from "../../common/types";
import {Scorer} from "../../full-text-search/src/scorer";
import {Serialization} from "./serialization/migration";
import { LokiEventEmitter } from "./event_emitter";
import { ResultSet } from "./result_set";
import { Collection } from "./collection";
import { Doc } from "../../common/types";
import { Scorer } from "../../full-text-search/src/scorer";
import { Serialization } from "./serialization/migration";

/**
* DynamicView class is a versatile 'live' view class which can have filters and sorts applied.
Expand Down
12 changes: 6 additions & 6 deletions packages/loki/src/loki.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* global global */
import {LokiEventEmitter} from "./event_emitter";
import {Collection} from "./collection";
import {clone} from "./clone";
import {Doc, StorageAdapter} from "../../common/types";
import {PLUGINS} from "../../common/plugin";
import {Serialization, migrateDatabase} from "./serialization/migration";
import { LokiEventEmitter } from "./event_emitter";
import { Collection } from "./collection";
import { clone } from "./clone";
import { Doc, StorageAdapter } from "../../common/types";
import { PLUGINS } from "../../common/plugin";
import { Serialization, migrateDatabase } from "./serialization/migration";

function getENV(): Loki.Environment {
if (global !== undefined && (global["android"] || global["NSObject"])) {
Expand Down
14 changes: 7 additions & 7 deletions packages/loki/src/result_set.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Collection} from "./collection";
import {clone, CloneMethod} from "./clone";
import {ltHelper, gtHelper, aeqHelper, sortHelper} from "./helper";
import {Doc} from "../../common/types";
import {Scorer} from "../../full-text-search/src/scorer";
import {Query as FullTextSearchQuery} from "../../full-text-search/src/query_types";
import {Serialization} from "./serialization/migration";
import { Collection } from "./collection";
import { clone, CloneMethod } from "./clone";
import { ltHelper, gtHelper, aeqHelper, sortHelper } from "./helper";
import { Doc } from "../../common/types";
import { Scorer } from "../../full-text-search/src/scorer";
import {Query as FullTextSearchQuery } from "../../full-text-search/src/query_types";
import { Serialization } from "./serialization/migration";

// used to recursively scan hierarchical transform step object for param substitution
function resolveTransformObject<TData extends object, TNested extends object>(subObj: Collection.Transform<TData, TNested>, params: object, depth: number = 0): Collection.Transform<TData, TNested> {
Expand Down
6 changes: 3 additions & 3 deletions packages/loki/src/serialization/migration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {V2_0, V2_0 as Serialization} from "./v2_0";
import {V1_5} from "./v1_5";
import {Dict} from "../../../common/types";
import { V2_0, V2_0 as Serialization } from "./v2_0";
import { V1_5 } from "./v1_5";
import { Dict } from "../../../common/types";

export {Serialization};

Expand Down
4 changes: 2 additions & 2 deletions packages/loki/src/serialization/v1_5.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Dict} from "../../../common/types";
import { Dict } from "../../../common/types";

export namespace V1_5 {

Expand Down Expand Up @@ -68,7 +68,7 @@ export namespace V1_5 {
dataOptions?: ResultSet.DataOptions;
} | {
type: "mapReduce";
mapFunction: 2,//(item: Doc<object>, index: number, array: Doc<object>[]) => any;
mapFunction: 2, //(item: Doc<object>, index: number, array: Doc<object>[]) => any;
reduceFunction: (array: any[]) => any;
} | {
type: "update";
Expand Down
8 changes: 4 additions & 4 deletions packages/loki/src/serialization/v2_0.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Dict} from "../../../common/types";
import { Dict } from "../../../common/types";

export namespace V2_0 {

Expand Down Expand Up @@ -212,9 +212,9 @@ export namespace V2_0 {

export type Query =
{ [P: string]: LokiOps | any }
& { $and?: Query[] }
& { $or?: Query[] }
& { $fts?: FullTextSearch.Query };
| { $and?: Query[] }
| { $or?: Query[] }
| { $fts?: FullTextSearch.Query };

export interface FullTextSearch {
id: string;
Expand Down

0 comments on commit a300130

Please sign in to comment.