Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359774

Summary: Functionality missing on SQLDataSource
Product: z_Archived Reporter: Joseph Vincens <jvincens>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: svihovec, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Joseph Vincens CLA 2011-10-03 17:51:43 EDT
constructor(url string, properties dictionary) 

getAutoCommit() returns(boolean)
setAutoCommit(boolean autoCommit) 

getTransactionIsolation() returns(int)
setTransactionIsolation(int level) 
supportsTransactionIsolationLevel(int level) returns(boolean)

getWarnings() returns(SQLWarning)

isClosed() returns(boolean)
isReadOnly() returns(boolean)
isValid(int timeout) 

record SQLWarning extends SQLException
	nextWarning SQLWarning? {@Property {getMethod = "getNextWarning", setMethod = ""}};
end

We need the following constants for TransactionIsolation:
	Connection.TRANSACTION_NONE;
	Connection.TRANSACTION_READ_UNCOMMITTED;
	Connection.TRANSACTION_READ_COMMITTED
	Connection.TRANSACTION_REPEATABLE_READ;
	Connection.TRANSACTION_SERIALIZABLE;
Comment 1 Brian Svihovec CLA 2011-10-04 12:42:45 EDT
Joe, can this information be reviewed by Tim and added to the SQL spec before it is implemented?
Comment 2 Joseph Vincens CLA 2011-10-04 12:50:12 EDT
Already reviewed, I'll work on getting it added to the spec.
Comment 3 Joseph Vincens CLA 2011-10-04 12:59:11 EDT
To allow SQLWarning to extend SQLException the SQLException needs to change to an external type. Maybe something like:
externalType SQLException extends AnyException type NativeType 
	SQLState string?{@Property {}};
	ErrorCode int?{@Property {}};
	nextException SQLException?{@Property {}};
end

externalType SQLWarning extends SQLException type NativeType 
	nextWarning SQLWarning?{@Property {}};
end

This will require changes to ThrowStatementValidator.isAnyException, TryStatementValidator.isAnyException, and ServiceActionStatementValidator.isAnyException.
Comment 4 Justin Spadea CLA 2011-10-06 10:23:13 EDT
Changes have been delivered to edt.compiler, edt.ide.rui, and edt.runtime.java. No change was made to ServiceActionStatementValidator.isAnyException since that function must remain as a check for specifically AnyException and nothing that extends AnyException.

SMAP files were added/updated for better display of various SQL variables in debug.

Also added "getWarnings()" to SQLResultSet.
Comment 5 Joseph Vincens CLA 2011-10-24 16:08:49 EDT
verified