Java DataSource createTableRecommendation(DataSource dataSource)

Here you can find the source of createTableRecommendation(DataSource dataSource)

Description

create Table Recommendation

License

Apache License

Declaration

private static void createTableRecommendation(DataSource dataSource) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.Connection;

import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;

public class Main {
    private static void createTableRecommendation(DataSource dataSource) {
        try (Connection connection = dataSource.getConnection(); Statement stmt = connection.createStatement()) {
            stmt.execute("CREATE TABLE recommendation (person_id int, index_ int, skill_id int, feedback boolean)");
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }//  w  w  w.  ja  va  2  s.  c  o m
    }
}

Related

  1. createDataSource()
  2. createDataTable(DataSource dataSource, String tableName)
  3. createDerbyEmbeddedDataSource(Properties props)
  4. createTable(DataSource ds, String ddl)
  5. createTable(DataSource ds, String tableName)
  6. createTables(DataSource ds)
  7. createTables(final DataSource ds)
  8. doInsert(DataSource ds, String tableName, int id, String value)
  9. doSelect(DataSource ds, String tableName, int id)