aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMCopyTable.m
Commit message (Collapse)AuthorAgeFilesLines
* - Apply column autosizing improvements to custom query loadingrowanbeentje2010-08-161-4/+34
| | | | | | | | - Move Table Content progress tracking onto the main thread's load timer - Improve thread safety when autosizing - Improve autosize to not contrain wide columns as much in tables where all columns can be shown, or if the column is double-clicked to size. (This completes work on Issue #271 and Issue #272)
* Column autosizing:rowanbeentje2010-08-121-1/+5
| | | | | | - Handle "(not loaded)" placeholders; this addresses http://spbug.com/l/1420 - Fix row inspection of widely-spaced rows for large, fast-loading tables, ensuring up to maxRows rows are inspected
* Implement column autosizing for the Content View:rowanbeentje2010-08-121-0/+95
| | | | | | | | - Add automatic column sizing (for columns without saved widths) as part of the value loading process - Rework table updates to be timer based, for time-based and more regular updates. This improves speed and allows tables to update more consistently. This results in overall smoother table loads, faster table loads, and autosizing columns. This partially implements Issues #271 and #272. Column autosizing will likely be tweaked, and this will all also be extended to Custom Query views in a future patch.
* Rename CustomQuery as SPCustomQuery.stuconnolly2010-07-061-2/+2
|
* Rename TableContent to SPTableContent.stuconnolly2010-05-281-4/+4
|
* - Correctly append tabs to binary/data cells when copying as tab-separated ↵rowanbeentje2010-05-111-1/+3
| | | | rows. This addresses Issue #681
* - Ensure Copy [with Column Names]/Copy As SQL are disabled on the trigger ↵rowanbeentje2010-03-291-12/+31
| | | | and relations views. This fixes the copy parts of http://log.sequelpro.com/view/53
* Following a manual code review, fix some local variables overriding global ↵rowanbeentje2010-03-151-1/+1
| | | | variables, a few leaks, and additional nil setting/checking to prevent overreleases or releases of random areas of memory.
* - When copying (as TSV) or dragging rows, copy BLOBs and binary TEXTs as ↵rowanbeentje2010-02-031-6/+21
| | | | | | | they are shown - as strings. This addresses Issue #558. - Remove some unused variables
* - Check whether super implement awakeFromNib before calling to fix 10.5 ↵rowanbeentje2010-02-011-1/+3
| | | | compatibility
* Rework CMCopyTable copy functionality and related code:rowanbeentje2010-01-301-196/+198
| | | | | | | | | | - Reverse the effects of the r1664/r1690 combination, restoring the original link from CMCopyTable to the underlying data source - Adapt the code to retrieve information from the new SPDataStorage; update SPDataStorage as necessary if underlying data changes - Refactor and speed up various checks and loops for speed and logic improvements - Ensure the binary-encoded TEXT data is hex encoded rather than retrieved as "<123ABC 123ABC...>" NSData representations - Fix some memory leaks This resolves Issue #533 and the original "Copy as SQL" issue
* Add a new SPDataStorage class, and use it in TableContent and CustomQuery:rowanbeentje2010-01-171-3/+1
| | | | | | | | - SPDataStorage is a class designed for a 2D array of fixed-width data storage, replacing the current method of nested NSMutableArrays. NSFastEnumerator compatible. - Overall memory overhead for table storage in memory reduced by 1.2-1.4x - this almost gains back the large memory jump seen for 64 bit - Some operations (adding data, retrieving a single cell's data) are faster than nested NSMutableArrays; some operations (requesting a row as an NSArray) are slightly slower as the data needs to be converted, but overall result is a slight speed gain. (- Could be used in future to store SQL results in C datatypes, avoiding very high NSObject overhead for numbers and short strings)
* • fixed issue for "Copy as SQL INSERT" after filteringBibiko2010-01-111-1/+7
| | | | | - accessing table data from [dataSource:tableView:objectValueForTableColumn:row] directly - maybe related to issue 506
* - Upgrade Sequel Pro to be compiled as a 3-way PPC/i386/x86_64 binary for ↵rowanbeentje2010-01-091-14/+14
| | | | | | | release builds, including a large number of 64bit compatibility upgrades and tweaks - Upgrade RegexKitLite to 3.3
* • replaced the (10.4) deprecated [NSTableView ↵Bibiko2010-01-041-49/+43
| | | | | | tableView:writeRows:toPasteboard:] method by [NSTableView tableView:writeRowsWithIndexes:toPasteboard:] • some code cosmetics
* • remember scrollview port and selected row after editing in the Custom ↵Bibiko2010-01-041-1/+16
| | | | | | | | | | Query table view - after reloading the entire data the table view port will be restored but this leads up to now to a "tiny jitter" (maybe fixable in the near future) - the re-selection does NOT follow the actual edited row, e.g. if one changes a cell value whose column is used for sorting the actual edited row could appear somewhere • if the editing in the Custom Query table view was invoked by pressing RETURN/ENTER one can go through the columns by pressing ESC but up to now that editing will be interrupted after the user pressed OK - this behaviour is temporary and should be fixed in the near future by storing the new row data temporarily; after editing the last column AND if all columns have the same table origin the row data will be updated. To allow the row editing for columns which have different table origins could probably cause inconsistencies. - further discussion is needed
* - Work through static analysis of the source, fixing a number of small ↵rowanbeentje2009-12-141-1/+4
| | | | memory leaks and fixing a couple of over-releases
* - Improve import cancellation responsiveness, especially for lots of short ↵rowanbeentje2009-12-021-1/+0
| | | | | | | data rows or slow connections - Remove a debug NSLog on "Copy as SQL insert"
* - Fix copying SQL INSERTs for binary-type strings (regression somewhere ↵rowanbeentje2009-11-301-3/+8
| | | | since 0.9.6)
* Tidy up.stuconnolly2009-11-071-3/+0
|
* Replace the use of hard coded preference keys with constants to prevent ↵stuconnolly2009-10-171-3/+4
| | | | issues such as the one fixed in revision 1419. All future preference usage should be done so using these constants.
* • fixed three further typos for: objectForKey:@"NullValue"Bibiko2009-10-161-2/+2
| | | | • allow to enter the NULL value string even if the cell/field's maximal length is set to less then the actual NULL value string length (eg varchar(3) and NULL value string is @"NULL")
* Improve handling of NULL and "(not loaded)" placeholders:rowanbeentje2009-10-101-7/+17
| | | | | | | - Rewrite TableContent and CustomQuery to store NSNull and SPNotLoaded objects in the data arrays where appropriate, rather than providing string conversion on data load. Faster, simpler comparisons and processing code, slightly lower memory usage, and reduces the chance of bugs caused by inadvertantly processing the string values; we can now also distinguish easily between NULL and "NULL" etc, and further paves the ground for image representations of special values. - Fix a bug caused by consistent value reloading when editing BLOB/TEXT columns with deferred loading - if editing a row and revisiting an edited cell, the original value was restored; the original value is now only loaded once. This addresses the rest of Issue #423.
* • some code cleaning and removing of the deprecated method ↵Bibiko2009-09-281-49/+53
| | | | 'selectedRowEnumerator'
* - Tweak keydown handling in the content view to reenable key interaction ↵rowanbeentje2009-09-151-4/+2
| | | | (eg selection changes with the arrow keys)
* Fixed keyDown editing of SPTableView and CMCopyTablemltownsend2009-08-281-3/+3
|
* • improvement for hitting RETURN or ENTER to invoke the row edit modeBibiko2009-08-271-2/+20
| | | | | | - fixed that the table is selectable again - hitting ENTER/RETURN are enabled only for TableContent and ask the delegate's tableView:shouldEditTableColumn: method for validation (by doing so a RETURN/ENTER is the same event as a double-click into a table cell for column 0 if table is in non-editing mode)
* Fix for not editing in CMCopyTable when hitting enter or return which is ↵mltownsend2009-08-261-0/+5
| | | | used in CustomQuery
* Fix a memory leak when loading a table's content. When setting the column ↵stuconnolly2009-08-181-1/+4
| | | | definitions in CMCopyTable, the array wasn't being released on subsequent allocations.
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-1/+2
| | | | | | | | | | | | | | | - Includes all custom code from subclasses CMMCPConnection and CMMCPResult, meaning they have subsequently been removed from the project. - All previous Sequel Pro specific code in the above subclasses has been removed in favour of the delegate (currently set to TableDocumet) informing the framework of such information. - All references to CMMCPConnection and CMMCPResult have subsequently been changed to MCPConnection and MCPResult. - Framework includes MySQL 5.1.36 client libraries and source headers. - Framework is now built as a 4-way (32/64 bit, i386/PPC arch) binary. - All import references to <MCPKit_bundled/MCPKit_bundled.h> have been changed to <MCPKit/MCPKit.h>. - New script 'build-mysql-client.sh' can be used to build the MySQL client libraries from the MySQL source. See the script's header for a list of available options or run it with no arguments to display it's usage. Note that there are still a few changes to be made to the framework with regard to removing Sequel Pro specific calls to the delegate. These however can be made later on as they have no effect on functionality and are merely design changes. Also, note that any future development done on the framework should be made to be as 'generic' as possible, with no Sequel Pro specific references. This should allow the framework to be integrated into another project without the need for SP specific code.
* Rework data storage and retrieval in TableContent and CustomQuery backing ↵rowanbeentje2009-07-131-22/+24
| | | | | | | | | | | | arrays, and make some editable CustomQuery improvements: - Switch to using arrays for row storage rather than dictionaries. Use the data column index for table column identifiers. - This fixes Issue #316 and also allows sorting by all custom query result columns using a column index rather than the name - Offers significant speed and memory advantages: result building is now 2x-3x faster, memory used for results storage is 30-40% lower, and result access is slightly faster. (Note full 2x-3x speed results won't be seen - result fetching and mysql binary work isn't included in the timing) - No longer need to fetch the first column of data for tables containing only blob types - Correctly escape strings when editing CustomQuery results - Rewrite NSArrayObjectAtIndex to use the native CFArrayGetValueAtIndex rather than cached selectors - neater code and I think slightly faster
* • fixed: make usage of backtickQuotedString to allow table names ↵Bibiko2009-06-231-8/+9
| | | | | | containing a ` • some minor code cleaning and commenting
* • first steps to synchronize CustomQuery table and ContentTableBibiko2009-06-221-2/+3
| | | | | | - CustomQuery table now allows to copy selected rows as SQL INSERT (table name is set to "<table>" - if a field is a blob display only the first 255 bytes/chars in the CQ table for speed reasons - blob fields in CQ does not listen to the pref setting for "LoadBlobsAsNeeded" because it could happen that no one-to-one relation to their original data will be found
* • added to SPArrayAdditions.h: NSArrayObjectAtIndex() inline functionBibiko2009-06-181-2/+2
| | | | | | | | | - id o = NSArrayObjectAtIndex(anArray, index) :== id o = [anArray objectAtIndex:index] - this speed up it ~3µs per call - replaced that inline function for such calls within loops to speed up them • used IMP function pointers for keepAlive calls within queryString: • set -O3 (Fastest) compiler option • allow in preference pane "Tables" to set the Limit up to 50000
* • added: "Copy as SQL INSERT" ^⌥⌘CBibiko2009-06-081-83/+166
| | | | | | - up to now only available for the table content pane - supports blobs - if a primary key is given it also support (not yet loaded) blobs and long text data fields
* • improved "Copy as SQL INSERT" (still hidden)Bibiko2009-06-071-2/+3
| | | | • disabled "Copy with Column Names" if Custom Query editor is active
* • improved "Copy as SQL INSERT" (still hidden - can be tested if the menu ↵Bibiko2009-06-071-15/+50
| | | | item is set to 'not hidden' in the MainMenu)
* • moved macros enumerate() and sizeOf() to sequel-pro_Prefix.pchBibiko2009-06-061-20/+103
| | | | | | • added to SPArrayAdditions.m - (NSArray *)subarrayWithIndexes:(NSIndexSet *)indexes • added "Copy as SQL INSERT" to MainMenu (not yet activated) • added to CMCopyTable - (NSString *)selectedRowsAsSqlInserts for copying selectedRows as INSERT INTO ... string (under constructions, up to now it works for strings)
* Replaced check on title with check on menu tag for Copy with Column Names ↵bamse162009-05-251-2/+3
| | | | issue #233. Thanks to Ben for suggestion.
* More header updates for source files, including Subversion Id property.stuconnolly2009-05-191-0/+2
|
* Issue 233: Option to copy field headings from result panelsbamse162009-05-141-4/+18
| | | | | | Implementation of copy with column names menu item Removal of copy column names
* MERGED r262:266 from branches/stuart02 to trunk to include new project ↵stuconnolly2008-12-101-0/+183
structure.
> 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920