Colin,
> One other advantage with the "every possible column in the where
> clause" approach is reducing the risk of losing changes to the
> database. If a Squirrel user has a row in "maintenance mode" and after
> they have retrieved the row aother program changes one of the columns
> then when the Squirrel user generates and executes the update
> statement it will fail (0 rows updated) as the row will not be found.
> Contrast this with just using the primary key where the first update
> will be silently lost.
For the sake of flexibility, I agree.
How are you going to handle tables with BLOBs? If there is no primary key
in a table and the table contains one or more BLOB fields (which cannot be
used in a WHERE clause), there will be no reliable way to locate the
appropriate record to update. Do we just leave the BLOBs out of the query?
In which case the user better pay attention to how many rows will be
updated...
> For the more complex data types (such as image files) this sounds
> good. I can see some issues coming up with file locking etc. but I'm
> sure they can be worked around. However I think that defaulting to "in
> place" editing would be simpler and would cater for most of what
> people want. Normally if I want to edit a binary column I just want to
> flip a couple of bits, a form of hex editing would be fine for me.
> This would mean that for most data maintenance people would't have to
> configure Squirrel to point to the various external programs. I've
> found that if you have to configure a option then most people won't
> use it, they want it to work "out of the box".
I agree that if you want to flip a bit, then the hex editor would be best.
However, I think you underestimate the needs and overestimate the skills of
Squirrel users. The database I work with contains various graphic images
(bmp, gif, etc.). I wouldn't have the faintest idea how to flip a bit in a
bitmap ;) I need an editor.
It would be annoying to have to open a hex editor, then click an export
button, choose a location, switch to a file browser, locate the exported
file, open the file, edit the file, save the file, return to Squirrel,
import the binary, then commit the changes. If I had to do all that I
wouldn't use Squirrel.
Hmmm. Maybe the default binary editor *should* be a hex editor. Maybe it
would be better to create an enhanced binary editor as a plug-in...
Russell
|