Browse Source

Merge branch 'master' of https://swopt.com:3000/enzo/Fis-SearchUtility

Enzo 1 year ago
parent
commit
7f8eaec749
5 changed files with 14 additions and 12 deletions
  1. 1 1
      index.ts
  2. 3 3
      services/query.service.ts
  3. 4 3
      test/test1.ts
  4. 4 3
      test/test2.ts
  5. 2 2
      test/test3.ts

+ 1 - 1
index.ts

@@ -1,4 +1,4 @@
-import { queryService } from "./services/query.service";
+import { SearchService } from "./services/query.service";
 
 const express = require('express');
 const bodyParser = require('body-parser');

+ 3 - 3
services/query.service.ts

@@ -1,9 +1,9 @@
 import * as fs from 'fs'
-import { _, isObject, get } from 'lodash'
+import {  isObject, get } from 'lodash'
 import { Observable, Subject, interval, map, of } from 'rxjs'
 import { DataPrepService } from './dataprep.service'
-
-export class queryService {
+import _ = require("lodash")
+export class SearchService {
 
     private dataPrepService : DataPrepService
     constructor(){

+ 4 - 3
test/test1.ts

@@ -3,11 +3,12 @@ pass in the conditions of their search enquiries. We will aslo have to cater to
 data to be filtered
  */
 import { Observable } from "rxjs"
-import { queryService } from "../services/query.service"
+import { SearchService } from "../services/query.service"
 import { Conditions, Storage } from "../services/query.service"
-import { _, isObject } from 'lodash'
+import {  isObject } from 'lodash'
+import _ = require("lodash")
 
-let query = new queryService()
+let query = new SearchService()
 
 //For now just local file storage. More will be preapred in the design phase later.
 let storageAddress: Storage = {

+ 4 - 3
test/test2.ts

@@ -3,11 +3,12 @@ pass in the conditions of their search enquiries. We will aslo have to cater to
 data to be filtered
  */
 import { Observable } from "rxjs"
-import { queryService } from "../services/query.service"
+import { SearchService } from "../services/query.service"
 import { Conditions, Storage } from "../services/query.service"
-import { _, isObject } from 'lodash'
+import { isObject } from 'lodash'
+import _ = require("lodash")
 
-let query = new queryService()
+let query = new SearchService()
 
 let mongoStorage : any = {
     type: `MongoDB`,

+ 2 - 2
test/test3.ts

@@ -2,7 +2,7 @@
 
 import mongoose, { Model } from "mongoose";
 import { Subject, from, map, of, interval, buffer, asyncScheduler, observeOn, takeUntil, delay, queueScheduler, bufferWhen } from "rxjs";
-import { queryService } from "../services/query.service";
+import { SearchService } from "../services/query.service";
 const used = process.memoryUsage();
 
 let MongooseConnection: mongoose.Connection
@@ -89,7 +89,7 @@ function handlers(element: any) {
     }, randomInt * 1000)
 }
 function printLog() {
-    let service = new queryService()
+    let service = new SearchService()
     service.callFromOtherClass()
 }