Package org.springframework.jdbc.core.metadata

Examples of org.springframework.jdbc.core.metadata.TableMetaDataContext


            // Read type metadata from database connection
            Connection connection = this.dataSource.getConnection();
            DatabaseMetaData dbMetadata = connection.getMetaData();
           
            // Determine table name from insert query
            TableMetaDataContext context = new TableMetaDataContext();           
            String tableName = getTableNameFromInsertQuery(insertQuery);
            int i = tableName.lastIndexOf('.');
            if (i >= 0) {
                context.setSchemaName(tableName.substring(0, i));
                context.setTableName(tableName.substring(i+1));
            } else {
                context.setTableName(tableName);
            }
            context.setAccessTableColumnMetaData(true);
           
            // Try to parse column placeholders
            Map<String,String> placeholderMap = null;
            try {
                placeholderMap = getPlaceholderMap(insertQuery);
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.core.metadata.TableMetaDataContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.