1 28 29 package com.caucho.jdbc; 30 31 import com.caucho.util.Log; 32 33 import javax.sql.DataSource ; 34 import java.util.logging.Logger ; 35 36 39 public class MysqlMetaData extends JdbcMetaData { 40 private static final Logger log = Log.open(MysqlMetaData.class); 41 42 protected MysqlMetaData(DataSource ds) 43 { 44 super(ds); 45 } 46 47 50 public boolean supportsIdentity() 51 { 52 return true; 53 } 54 55 58 public String createIdentitySQL(String sqlType) 59 { 60 return sqlType + " auto_increment"; 61 } 62 63 66 public String limit(String sql, int limit) 67 { 68 if (limit < 0) 69 return sql; 70 else 71 return sql + " LIMIT " + limit; 72 } 73 } 74 | Popular Tags |