Colin Bell wrote:
>>-----Original Message-----
>>From: Glenn [mailto:gw...@co...]
>>Sent: Friday, 6 February 2004 10:02
>>To: squ...@li...
>>Subject: Re: [Squirrel-sql-develop] New plugin planned
>>
>
> [...]
>
>>The ContentsTab editing mechanism cannot be used as-is in the SQL tab
>>because:
>>
>>- it assumes that only one table it being displayed, and
>>- it assumes that all columns in the table are being
>>displayed, as well
>>as any pseudo-column key fields (e.g. ROWID, OID, etc).
>>
> [...]
>
>
> One possibility would be to only allow editing in the SQL tab if
> there is only a single table in the SQL statement and the column list
> includes all primary key columns for the table and the table has at least
> one primary key column. The downside of this of course is that any
> table you want want to do maintenance on _must_ have a primary key
> defined for it.
Well, we could be a bit less restrictive by saying:
- any table with a primary key OR
- any query of the form "SELECT * FROM <table> [WHERE...]"
That would give us enough to do the same update we do now in
ContentsTab. Of course, that eliminates the really useful part of the
SQL tab - the ability to do joins. It could also be rather annoying to
have the results be sometimes editable and sometimes not.
[snip]
>
> "Due to differences in database implementations, the JDBC API does not
> specify an ex-act
> set of SQL queries which must yield an updatable result set for JDBC drivers
> that
> support updatability. Developers can, however, generally expect queries
> which meet
> the following criteria to produce an updatable result set:
> 1. The query references only a single table in the database.
> 2. The query does not contain any join operations.
> 3. The query selects the primary key of the table it references."
Help me out here. If someone is looking at just one table, why are they
not using the ContentsTab? Since one of our fellow contributors
recently added the ability to do a WHERE clause filter on the
ContentsTab, it seems to me the user gets the same capability with less
typing than in the SQL tab. Given the severe limitations on what could
be updateable in the SQL tab and the inconsistancy of sometimes-editable
sometimes-not, what would be the benefit of adding editing there? Maybe
instead of adding that feature, we just point people to the ContentsTab?
Of course, if you could edit/update the results of a join, that would be
a different story, but I haven't heard any suggestions on how to do that.
Glenn
>
>
> Col
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Squirrel-sql-develop mailing list
> Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
>
>
|