Package net.sourceforge.squirrel_sql.fw.sql

Examples of net.sourceforge.squirrel_sql.fw.sql.ISQLDatabaseMetaData


                    buf.append(line1.trim() + " ");
                    buf.append(line2.trim() + " ");
                }
                String source = "";
                if (buf.length() == 0 && sourceType == TABLE_TYPE) {
                    ISQLDatabaseMetaData md = session.getMetaData();
                    // TODO: Need to define a better approach to getting dialects.
                    // That is, we don't really want to ever prompt the user in this
                    // case.  It's always Oracle.  Yet, we may have a new OracleDialect
                    // at some point.
                    HibernateDialect dialect = DialectFactory.getDialect("Oracle");
View Full Code Here


  private String getRegularTableSelectSql(ITableInfo ti)
  {
    StringBuilder tmp = new StringBuilder();
    tmp.append("select '");

    ISQLDatabaseMetaData md = getSession().getMetaData();
    try
    {
      HibernateDialect dialect = DialectFactory.getDialect(md);
      List<ITableInfo> tableList = asList(new ITableInfo[]
        { ti });
View Full Code Here

  protected String[] generateSQLStatements() throws UserCancelledOperationException, SQLException
  {
    ArrayList<String> results = new ArrayList<String>();


    ISQLDatabaseMetaData md = _session.getMetaData();

    String catalog = _info[0].getCatalogName();
    String schema = _info[0].getSchemaName();
    DatabaseObjectQualifier qualifier = new DatabaseObjectQualifier(catalog, schema);
    String destinationTable = _info[0].getSimpleName();
View Full Code Here

   */
  public void execute()
  {
    try
    {
      ISQLDatabaseMetaData md = _session.getMetaData();
      _dialect =
        DialectFactory.getDialect(DialectFactory.DEST_TYPE, _session.getApplication().getMainFrame(), md);
      if (isRefactoringSupportedForDialect(_dialect))
      {
        onExecute();
View Full Code Here

   *           the Timestamp to get the nanosecond value from
   * @return a string representing the nanosecond value.
   */
  private String getNanos(Timestamp ts) throws SQLException
  {
    ISQLDatabaseMetaData md = _session.getMetaData();
    HibernateDialect dialect = DialectFactory.getDialect(md);

    boolean dialectSupportsSubSecondTimestamps = getTimestampFlag();
    if (!dialectSupportsSubSecondTimestamps
        || dialect.getTimestampMaximumFractionalDigits() == 0) {
View Full Code Here

    * @return true if supported; false otherwise.
    * @throws SQLException
    */
   private boolean getTimestampFlag() throws SQLException {
     if (dialectSupportsSubSecondTimestamps == null) {
       ISQLDatabaseMetaData md = _session.getMetaData();
       HibernateDialect dialect = DialectFactory.getDialect(md);
       dialectSupportsSubSecondTimestamps = dialect.supportsSubSecondTimestamps();
     }
     return dialectSupportsSubSecondTimestamps;
   }
View Full Code Here

  protected String[] generateSQLStatements() throws UserCancelledOperationException
  {
    ArrayList<String> results = new ArrayList<String>();
    ArrayList<String> updateResults = new ArrayList<String>();

    ISQLDatabaseMetaData md = _session.getMetaData();

    String joinString = customDialog.getJoinString();
    String column1 = customDialog.getFirstColumn();
    String column2 = customDialog.getSecondColumn();
    String catalog = _info[0].getCatalogName();
View Full Code Here

            commitConnection(destCon);
        }
       
        if (prefs.isCopyIndexDefs()) {
            Collection<String> indices = null;
            ISQLDatabaseMetaData sqlmd = sourceSession.getMetaData();
            if (prefs.isCopyPrimaryKeys()) {
                PrimaryKeyInfo[] pkList = sqlmd.getPrimaryKey(ti);
                List<PrimaryKeyInfo> pkList2 = Arrays.asList(pkList);
                indices = DialectUtils.createIndexes(ti, sqlmd, pkList2, new CreateScriptPreferences());
            } else {
                indices = DialectUtils.createIndexes(ti, sqlmd, null, new CreateScriptPreferences());
            }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.sql.ISQLDatabaseMetaData

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.