Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit 6ad44ab

Browse files
committed
chore(service): remove Database service
1 parent dd8bdbb commit 6ad44ab

File tree

5 files changed

+0
-67
lines changed

5 files changed

+0
-67
lines changed

src/angular.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ export function bootstrapAngular1() {
7171
return container.deploy;
7272
}])
7373

74-
.factory('$ionicDB', ['$timeout', function($timeout) {
75-
container.database._digest = () => $timeout( () => { return; }, 0);
76-
return container.database;
77-
}])
78-
7974
.run(['$window', '$q', '$rootScope', function($window, $q, $rootScope) {
8075
if (typeof $window.Promise === 'undefined') {
8176
$window.Promise = $q;

src/database.ts

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

src/definitions.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Device as NativeDevice } from 'ionic-native';
2-
import { IonicDBOptions } from '@ionic/db';
32

43
/**
54
* @hidden
@@ -81,13 +80,6 @@ export interface ILogger {
8180
error(message?: any, ...optionalParams: any[]);
8281
}
8382

84-
/**
85-
* @hidden
86-
*/
87-
export interface DBDependencies {
88-
emitter: IEventEmitter;
89-
}
90-
9183
/**
9284
* @hidden
9385
*/
@@ -152,11 +144,6 @@ export interface CloudSettings {
152144
*/
153145
push?: PushOptions;
154146

155-
/**
156-
* Settings for Ionic DB.
157-
*/
158-
database?: IonicDBOptions;
159-
160147
/**
161148
* Settings for native auth.
162149
*/

src/di.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Device as NativeDevice } from 'ionic-native';
2-
import { IonicDBOptions } from '@ionic/db';
32

43
import {
54
AppStatus,
@@ -47,7 +46,6 @@ import { Client } from './client';
4746
import { Config } from './config';
4847
import { Cordova } from './cordova';
4948
import { Core } from './core';
50-
import { Database } from './database';
5149
import { Deploy } from './deploy/deploy';
5250
import { Device } from './device';
5351
import { EventEmitter } from './events';
@@ -273,26 +271,4 @@ export class Container {
273271
'logger': this.logger
274272
});
275273
}
276-
277-
@cache
278-
get database(): Database {
279-
let config = this.config;
280-
let c: IonicDBOptions = {};
281-
282-
if (typeof config.settings !== 'undefined' && typeof config.settings.database !== 'undefined') {
283-
c = config.settings.database;
284-
if (c.app_id === 'none') {
285-
delete c.app_id;
286-
} else {
287-
c.app_id = c.app_id || config.get('app_id');
288-
}
289-
} else {
290-
c.app_id = config.get('app_id');
291-
}
292-
293-
return new Database({
294-
'emitter': this.eventEmitter
295-
}, c);
296-
}
297-
298274
}

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export { Cordova } from './cordova';
2121
export { Core } from './core';
2222
export { Deploy } from './deploy/deploy';
2323
export { Device } from './device';
24-
export { Database } from './database';
2524
export { Exception, DetailedError } from './errors';
2625
export { Container as DIContainer } from './di';
2726
export { EventEmitter } from './events';

0 commit comments

Comments
 (0)