Skip to content

Commit 93991cc

Browse files
author
yanqizhou
committed
Merge branch 'master' of https://github.com/y500/YYDebugDatabase
2 parents fdc6d5f + ef5cea6 commit 93991cc

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ making one line code at `application:didFinishLaunchingWithOptions`:
5959
[[DebugDatabaseManager shared] startServerOnPort:9002];
6060
#end
6161
```
62+
# Advanced
63+
64+
It only shows the databasesin in Documents directory and Library/Cache directory by default, if you want show databases in other directories, you can use:
65+
66+
```
67+
- (void)startServerOnPort:(NSInteger)port directories:(NSArray*)directories
68+
```
69+
for example:
70+
71+
```
72+
NSString *resourceDirectory = [[NSBundle mainBundle] resourcePath];
73+
NSString *databaseDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/database"];
74+
NSString *documentDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documnets"];
75+
NSString *cacheDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Cache"];
76+
[[DebugDatabaseManager shared] startServerOnPort:9002 directories:@[resourceDirectory, databaseDirectory, documentDirectory, cacheDirectory]];
77+
```
6278

6379
That’s all, just start the application :
6480

@@ -67,11 +83,15 @@ Now open the provided link in your browser, and you will see like this:
6783
![](http://noti.qiniudn.com/693916a699a78a1c01da2d93126c0ed7.png)
6884

6985
query:
86+
7087
![](http://noti.qiniudn.com/21dd97948e85cf928751ef6d2b7d9266.png)
7188

7289
edit:
90+
7391
![](http://noti.qiniudn.com/b081fa0e1842a05c23321d08f7cec668.png)
92+
7493
delete:
94+
7595
![](http://noti.qiniudn.com/d0c7cb82ae6aadf790dc57da6c6e888f.png)
7696

7797

@@ -97,3 +117,4 @@ Important:
97117
See the License for the specific language governing permissions and
98118
limitations under the License.
99119
```
120+

0 commit comments

Comments
 (0)