Package net.sourceforge.squirrel_sql.fw.dialects

Examples of net.sourceforge.squirrel_sql.fw.dialects.HibernateDialect


    tmp.append("select '");

    ISQLDatabaseMetaData md = getSession().getMetaData();
    try
    {
      HibernateDialect dialect = DialectFactory.getDialect(md);
      List<ITableInfo> tableList = asList(new ITableInfo[]
        { ti });
      CreateScriptPreferences prefs = new CreateScriptPreferences();
      List<String> sqls = dialect.getCreateTableSQL(tableList, md, prefs, false);
      for (String sql : sqls)
      {
        tmp.append(sql);
        tmp.append(statementSeparator);
        tmp.append("\n");
View Full Code Here


   * @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) {
      return "";
    }
   
    String result = "" + ts.getNanos();

      int timestampMaximumFractionalDigits = dialect.getTimestampMaximumFractionalDigits();
      if(result.length() >= timestampMaximumFractionalDigits)
      {
         result = result.substring(0, timestampMaximumFractionalDigits);
      }
    return result;
View Full Code Here

    * @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

   * @param session the session to check for supported refactorings.
   */
  public SupportedRefactoringsTab(ISession session)
  {
    try {
      HibernateDialect dialect = DialectFactory.getDialect(session.getMetaData());
      Method[] methods = dialect.getClass().getMethods();
      for (Method method : methods)
      {
        if (isRefactoringSupportMethodName(method.getName()))
        {
            Boolean supported = (Boolean) method.invoke(dialect, (Object[])null);
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.dialects.HibernateDialect

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.