forked from bububa/MongoHub-Mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExportWindowController.h
60 lines (56 loc) · 2.4 KB
/
ExportWindowController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// ExportWindowController.h
// MongoHub
//
// Created by Syd on 10-6-22.
// Copyright 2010 ThePeppersStudio.COM. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <mongo/client/dbclient.h>
@class Connection;
@class DatabasesArrayController;
@class MCPConnection;
@class MongoDB;
@class FieldMapTableController;
@interface ExportWindowController : NSWindowController {
NSManagedObjectContext *managedObjectContext;
DatabasesArrayController *databasesArrayController;
NSString *dbname;
Connection *conn;
MongoDB *mongoDB;
MCPConnection *db;
IBOutlet NSArrayController *dbsArrayController;
IBOutlet NSArrayController *tablesArrayController;
IBOutlet NSTextField *hostTextField;
IBOutlet NSTextField *portTextField;
IBOutlet NSTextField *userTextField;
IBOutlet NSSecureTextField *passwdTextField;
IBOutlet NSTextField *collectionTextField;
IBOutlet NSProgressIndicator *progressIndicator;
IBOutlet NSPopUpButton *tablesPopUpButton;
IBOutlet FieldMapTableController *fieldMapTableController;
}
@property (nonatomic, retain) Connection *conn;
@property (nonatomic, retain) MCPConnection *db;
@property (nonatomic, retain) MongoDB *mongoDB;
@property (nonatomic, retain) DatabasesArrayController *databasesArrayController;
@property (nonatomic, retain) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain) NSString *dbname;
@property (nonatomic, retain) NSArrayController *dbsArrayController;
@property (nonatomic, retain) NSArrayController *tablesArrayController;
@property (nonatomic, retain) NSTextField *hostTextField;
@property (nonatomic, retain) NSTextField *portTextField;
@property (nonatomic, retain) NSTextField *userTextField;
@property (nonatomic, retain) NSSecureTextField *passwdTextField;
@property (nonatomic, retain) NSTextField *collectionTextField;
@property (nonatomic, retain) NSProgressIndicator *progressIndicator;
@property (nonatomic, retain) NSPopUpButton *tablesPopUpButton;
@property (nonatomic, retain) FieldMapTableController *fieldMapTableController;
- (void)initInterface;
- (IBAction)connect:(id)sender;
- (IBAction)export:(id)sender;
- (IBAction)showTables:(id)sender;
- (IBAction)showFields:(id)sender;
- (long long int)exportCount:(NSString *)collection user:(NSString *)user password:(NSString *)password;
- (void)doExportToTable:(NSString *)tableName data:(mongo::BSONObj) bsonObj fieldTypes:(NSDictionary *)fieldTypes;
@end