diff options
author | stuconnolly <stuart02@gmail.com> | 2010-09-17 20:06:37 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-09-17 20:06:37 +0000 |
commit | 7dfafb60062fc150f71bba694810cd8d328efd00 (patch) | |
tree | d73b3e24ab54b2f93c9b0dfa2b76416015505ad3 /Source/SPIndexesController.h | |
parent | 263b41b74510f4778fc463c7f6c31fe71e0ee650 (diff) | |
download | sequelpro-7dfafb60062fc150f71bba694810cd8d328efd00.tar.gz sequelpro-7dfafb60062fc150f71bba694810cd8d328efd00.tar.bz2 sequelpro-7dfafb60062fc150f71bba694810cd8d328efd00.zip |
New add index sheet, which includes:
- The ability to easily index multiple columns
- The ability to specify the storage type (HASH or BTREE) that should be used when available and permitted
- The ability to specify a length prefix when indexing a specific column (required on TEXT columns)
Requires lots of testing.
Diffstat (limited to 'Source/SPIndexesController.h')
-rw-r--r-- | Source/SPIndexesController.h | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/Source/SPIndexesController.h b/Source/SPIndexesController.h index 8fe7c88d..cd049e57 100644 --- a/Source/SPIndexesController.h +++ b/Source/SPIndexesController.h @@ -23,7 +23,13 @@ // // More info at <http://code.google.com/p/sequel-pro/> -@class SPDatabaseDocument, SPTablesList, SPTableData, SPTableStructure, MCPConnection; +@class SPDatabaseDocument, SPTablesList, SPTableData, SPTableStructure, MCPConnection, BWAnchoredButtonBar; + +// Constants +extern NSString *SPNewIndexIndexName; +extern NSString *SPNewIndexIndexType; +extern NSString *SPNewIndexIndexedColumns; +extern NSString *SPNewIndexStorageType; @interface SPIndexesController : NSWindowController { @@ -41,18 +47,45 @@ // New index sheet IBOutlet NSPopUpButton *indexTypePopUpButton; IBOutlet NSTextField *indexNameTextField; - IBOutlet NSComboBox *indexedColumnsComboBox; + IBOutlet NSTableView *indexedColumnsTableView; + IBOutlet NSScrollView *indexedColumnsScrollView; + IBOutlet NSTextField *indexTypeLabel; + IBOutlet NSTextField *indexNameLabel; + IBOutlet NSTableColumn *indexSizeTableColumn; + IBOutlet NSButton *addIndexedColumnButton; + IBOutlet NSButton *removeIndexedColumnButton; + IBOutlet NSButton *confirmAddIndexButton; + IBOutlet BWAnchoredButtonBar *anchoredButtonBar; + // Advanced options view + IBOutlet NSButton *indexAdvancedOptionsViewButton; + IBOutlet NSView *indexAdvancedOptionsView; + IBOutlet NSButton *indexAdvancedOptionsViewLabelButton; + IBOutlet NSPopUpButton *indexStorageTypePopUpButton; + NSString *table; - NSMutableArray *fields, *indexes; + NSMutableArray *fields, *indexes, *indexedFields, *supportsLength, *requiresLength; NSUserDefaults *prefs; MCPConnection *connection; + + BOOL showAdvancedView; + + NSInteger heightOffset; + NSUInteger windowMinWidth; + NSUInteger windowMinHeigth; } +/** + * @property table The table currently being viewed + */ @property (readwrite, retain) NSString *table; + +/** + * @property connection The MySQL connection to use + */ @property (readwrite, assign) MCPConnection *connection; - (IBAction)addIndex:(id)sender; @@ -60,6 +93,10 @@ - (IBAction)chooseIndexType:(id)sender; - (IBAction)closeSheet:(id)sender; +- (IBAction)addIndexedField:(id)sender; +- (IBAction)removeIndexedField:(id)sender; +- (IBAction)toggleAdvancedIndexOptionsView:(id)sender; + - (void)setFields:(NSArray *)tableFields; - (void)setIndexes:(NSArray *)tableIndexes; |