Package net.sourceforge.squirrel_sql.fw.sql

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


  public List<ObjectTreeNode> createChildren(ISession session, ObjectTreeNode parentNode)
    throws SQLException
  {
    final List<ObjectTreeNode> childNodes = new ArrayList<ObjectTreeNode>();
    final ISQLConnection conn = session.getSQLConnection();
    final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
    final IDatabaseObjectInfo parentDbinfo = parentNode.getDatabaseObjectInfo();
    final String schemaName = parentDbinfo.getSchemaName();

    final PreparedStatement pstmt = conn.prepareStatement(isAdmin?SQL_ADMIN:SQL_USER);
    try
View Full Code Here


        ForeignKeyInfo fkInfo, SessionInfoProvider prov)
  {
    boolean result = false;
    try
    {
      SQLDatabaseMetaData md = prov.getCopyDestSession().getSQLConnection().getSQLMetaData();

      ITableInfo[] tables = md.getTables(destCatalog, destSchema, destTableName, new String[]
        { "TABLE" }, null);
      if (tables != null && tables.length == 1)
      {
        ForeignKeyInfo[] fks = SQLUtilities.getImportedKeys(tables[0], md);
        for (ForeignKeyInfo existingKey : fks)
View Full Code Here

    if (result == null || result.length == 0)
    {
      // Fallback to the old method, going directly to the database
      // instead
      // of using SchemaInfo, since SchemaInfo didn't have it.
      SQLDatabaseMetaData d = session.getSQLConnection().getSQLMetaData();
      result = getTables(d, catalog, schema, tableName);
    }

    return result;
  }
View Full Code Here

          // When the user pastes on a TABLE label which is located under a
          // schema/catalog, build the schema DatabaseObjectInfo.
          if (DatabaseObjectType.TABLE_TYPE_DBO.equals(dbObjs[0].getDatabaseObjectType())) {
            IDatabaseObjectInfo tableLabelInfo = dbObjs[0];
            ISQLConnection destCon = destSession.getSQLConnection();
            SQLDatabaseMetaData md = null;
            if (destCon != null) {
              md = destCon.getSQLMetaData();
            }
            IDatabaseObjectInfo schema =
              new DatabaseObjectInfo(null,
View Full Code Here

        throws SQLException
  {
    final List<ObjectTreeNode> childNodes = new ArrayList<ObjectTreeNode>();
    final IDatabaseObjectInfo parentDbinfo = parentNode.getDatabaseObjectInfo();
    final ISQLConnection conn = session.getSQLConnection();
    final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
    final String catalogName = parentDbinfo.getCatalogName();
    final String schemaName = parentDbinfo.getSchemaName();
    final ObjFilterMatcher filterMatcher = new ObjFilterMatcher(session.getProperties());

    PreparedStatement pstmt = null;
View Full Code Here

        }
      }

      _plugin.setCopySourceSession(_session);
      final IDatabaseObjectInfo[] fdbObjs = dbObjs;
      final SQLDatabaseMetaData md = _session.getSQLConnection().getSQLMetaData();
      _session.getApplication().getThreadPool().addTask(new Runnable()
      {
        public void run()
        {
          try
View Full Code Here

   */
  public List<ObjectTreeNode> createChildren(ISession session, ObjectTreeNode parentNode)
  {
    final List<ObjectTreeNode> childNodes = new ArrayList<ObjectTreeNode>();
    final IDatabaseObjectInfo parentDbinfo = parentNode.getDatabaseObjectInfo();
    final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
    final String schemaName = parentDbinfo.getSchemaName();

    IDatabaseObjectInfo dbinfo = new TriggerParentInfo(parentDbinfo,
                      schemaName, md);
   
View Full Code Here

    if (tables.size() < 2)
    {
      // No point to ordering less than 2 tables
      return tables;
    }
    final SQLDatabaseMetaData md = _session.getSQLConnection().getSQLMetaData();

    ProgressCallBack getOrderedTablesCallBack =
      progressCallBackFactory.create(customDialog, i18n.PROGRESS_DIALOG_ANALYZE_TITLE, tables.size());
    getOrderedTablesCallBack.setLoadingPrefix(i18n.LOADING_PREFIX);
View Full Code Here

   {
      try
      {
         final List<ObjectTreeNode> childNodes = super.createChildren(session, parentNode);

         final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();

         // Users.
         DatabaseObjectInfo dboInfo = new DatabaseObjectInfo(null, null, "USERS",
            IObjectTypes.USER_PARENT, md);
         ObjectTreeNode node = new ObjectTreeNode(session, dboInfo);
View Full Code Here

  public List<ObjectTreeNode> createChildren(ISession session, ObjectTreeNode parentNode)
        throws SQLException
  {
    final List<ObjectTreeNode> childNodes = new ArrayList<ObjectTreeNode>();
    final ISQLConnection conn = session.getSQLConnection();
    final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();

    PreparedStatement pstmt = null;
    ResultSet rs = null;
    try
    {
View Full Code Here

TOP

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

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.