protected List < String > getAllColumns ( String tableName ) { List < String > columns = new ArrayList < String > ( ) ; try { // Lower-case table names are required for PostgreSQL; we might need to // alter this if we use another comparison database (besides HSQL) someday ResultSet rs = dbconn . getMetaData ( ) . getColumns ( null , null , tableName . toLowerCase ( ) , null ) ; while ( rs . next ( ) ) { columns . add ( rs . getString ( 4 ) ) ; } } catch ( SQLException e ) { printCaughtException ( "In NonVoltDBBackend.getAllColumns, caught SQLException: " + e ) ; } return columns ; }
Returns all column names for the specified table in the order defined in the DDL .