private static void generateCrudExpressionColumns ( Table table , StringBuilder sb ) { boolean first = true ; // Sort the catalog table columns by column order. ArrayList < Column > tableColumns = new ArrayList < Column > ( table . getColumns ( ) . size ( ) ) ; for ( Column c : table . getColumns ( ) ) { tableColumns . add ( c ) ; } Collections . sort ( tableColumns , new TableColumnComparator ( ) ) ; for ( Column c : tableColumns ) { if ( ! first ) sb . append ( ", " ) ; first = false ; sb . append ( c . getName ( ) + " = ?" ) ; } }
Helper to generate a full col1 = ? col2 = ? ... clause .