TAILIEUCHUNG - Bắt đầu với IBM Websphere smash - p 23

202 Chapter 8 Database Access case : case : case : case : case : case : case : case : type = "number" break; case : case : case : type = "boolean" break; default: type = "string" break; } headers = 10000 ) { break } } Download from Database Access with pureQuery 203 ('content', content) if ( rowCntr 1 ) { ('message', "Successfully retrieved. | 202 Chapter 8 Database Access case case case case case case case case type number break case case case type boolean break default type string break headers name x field C x type type map. .put headers headers -- - Process result set def content identifier . _id_ label C1 items J J def rowCntr 1 while def row _id_ rowCntr for int c 1 c c def cellData c C c cellData row -- Sanity check if rowCntr 10000 break Download from Database Access with pureQuery 203 content content if rowCntr 1 message Successfully retrieved rowCntr records else message No records found else -- Assume an update insert update delete def cnt message cnt records processed. catch Exception e processSql Error on SQL processing e message Error during SQL processing e finally try catch Exception e try catch Exception e return map The extra processing performed on the ResultsetMetaData is to build up a header section so that when we return the results back to the browser we can build a nicely formatted table. WebSphere sMash DBA The Database Administrator Application If you have not guessed by now we have all the makings of a DBA-style application. We can get a list of data sources with connection details obtain the schemas and tables for each data source get the columns for a table and then enable a user to execute SQL based on all the information we ve provided. All that s needed is to front these methods with REST accessors. To support the DBA application the JDBC scripts defined previously need to be made available as REST services. Start by creating a new WebSphere sMash application called and then .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.