|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.poem.dbms.AnsiStandard org.melati.poem.dbms.MSAccess
public class MSAccess
A Driver for the Microsoft Access database server. http://www.tobychampion.co.uk/Access2000Dialect.java.txt
Nested Class Summary | |
---|---|
static class |
MSAccess.MSAccessStringPoemType
Translates a MSSQL String into a Poem StringPoemType . |
Field Summary | |
---|---|
static int |
msAccessBinarySize
Size of binary fields. |
static int |
msAccessMemoSize
Size of memo fields. |
static int |
msAccessTextHack
Size of text fields. |
Fields inherited from class org.melati.poem.dbms.AnsiStandard |
---|
schema |
Constructor Summary | |
---|---|
MSAccess()
Constructor. |
Method Summary | |
---|---|
String |
alterColumnNotNullableSQL(String tableName,
Column column)
Accommodate SQLServer syntax. |
boolean |
canDropColumns()
Whether this DBMS can drop columns. |
PoemType |
canRepresent(PoemType storage,
PoemType type)
Enable one PoemType to represent another, for example a bit to represent a boolean. |
boolean |
canStoreBlobs()
Whether this DBMS can store binary data. |
String |
caseInsensitiveRegExpSQL(String term1,
String term2)
This is the Postgresql syntax. |
SQLPoemType |
defaultPoemTypeOfColumnMetaData(ResultSet md)
The simplest POEM type corresponding to a JDBC description from the database. |
String |
getBinarySqlDefinition(int size)
Accomodate different treatment of different sized binary data. |
String |
getFixedPtSqlDefinition(int scale,
int precision)
Cludge? Accomodate differing Fixed Point notations. |
String |
getLongSqlDefinition()
Accomodate Long / Bigint deviants. |
String |
getSqlDefaultValue(SQLType sqlType)
Used to set a not null value when creating a non nullable column. |
String |
getSqlDefinition(String sqlTypeName)
Retrieve a SQL type keyword used by the DBMS for the given Melati type name. |
String |
getStringSqlDefinition(int size)
Accomodate String / Text distinction. |
String |
melatiName(String name)
Ignore tables starting with '~', which should probably have a jdbc type of 'SYSTEM TABLE'. |
String |
selectLimit(String querySelection,
int limit)
Accomodate different limiting syntax. |
void |
shutdown(Connection connection)
A no-op for all but hsqldb, where the db needs to be shutdown when the servlet container or jvm is destroyed. |
String |
sqlBooleanValueOfRaw(Object raw)
Accomodate different true and false values. |
String |
unreservedName(String name)
A pair of functions for getting around keywords which make your JDBC driver barf, as 'group' does for MySQL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int msAccessTextHack
public static final int msAccessMemoSize
public static final int msAccessBinarySize
Constructor Detail |
---|
public MSAccess()
Method Detail |
---|
public boolean canDropColumns()
canDropColumns
in interface Dbms
canDropColumns
in class AnsiStandard
AnsiStandard.canDropColumns()
public boolean canStoreBlobs()
canStoreBlobs
in interface Dbms
canStoreBlobs
in class AnsiStandard
Dbms.canStoreBlobs()
public void shutdown(Connection connection) throws SQLException
shutdown
in interface Dbms
shutdown
in class AnsiStandard
SQLException
AnsiStandard.shutdown(java.sql.Connection)
public String unreservedName(String name)
unreservedName
in interface Dbms
unreservedName
in class AnsiStandard
name
- the field or table name
AnsiStandard.unreservedName(java.lang.String)
public String melatiName(String name)
melatiName
in interface Dbms
melatiName
in class AnsiStandard
name
- an SQL name
AnsiStandard.melatiName(java.lang.String)
public String getSqlDefinition(String sqlTypeName)
getSqlDefinition
in interface Dbms
getSqlDefinition
in class AnsiStandard
sqlTypeName
- the Melati internal type name
AnsiStandard.getSqlDefinition(java.lang.String)
public String getLongSqlDefinition()
getLongSqlDefinition
in interface Dbms
getLongSqlDefinition
in class AnsiStandard
AnsiStandard.getLongSqlDefinition()
public String getStringSqlDefinition(int size) throws SQLException
getStringSqlDefinition
in interface Dbms
getStringSqlDefinition
in class AnsiStandard
size
- the string length (-1 means no limit)
SQLException
AnsiStandard.getStringSqlDefinition(int)
public String getFixedPtSqlDefinition(int scale, int precision) throws SQLException
getFixedPtSqlDefinition
in interface Dbms
getFixedPtSqlDefinition
in class AnsiStandard
scale
- the number of places to right of decimal pointprecision
- how many digits in total
SQLException
- potentiallyAnsiStandard.getFixedPtSqlDefinition(int, int)
public String getBinarySqlDefinition(int size) throws SQLException
getBinarySqlDefinition
in interface Dbms
getBinarySqlDefinition
in class AnsiStandard
size
- how big the field is
SQLException
AnsiStandard.getBinarySqlDefinition(int)
public String sqlBooleanValueOfRaw(Object raw)
sqlBooleanValueOfRaw
in interface Dbms
sqlBooleanValueOfRaw
in class AnsiStandard
AnsiStandard.sqlBooleanValueOfRaw(java.lang.Object)
public PoemType canRepresent(PoemType storage, PoemType type)
canRepresent
in interface Dbms
canRepresent
in class AnsiStandard
storage
- the POEM native typetype
- the current type
AnsiStandard.canRepresent(org.melati.poem.PoemType, org.melati.poem.PoemType)
public SQLPoemType defaultPoemTypeOfColumnMetaData(ResultSet md) throws SQLException
defaultPoemTypeOfColumnMetaData
in interface Dbms
defaultPoemTypeOfColumnMetaData
in class AnsiStandard
md
- the JDBC metadata
SQLException
- potentiallyAnsiStandard.defaultPoemTypeOfColumnMetaData(java.sql.ResultSet)
public String caseInsensitiveRegExpSQL(String term1, String term2)
caseInsensitiveRegExpSQL
in interface Dbms
caseInsensitiveRegExpSQL
in class AnsiStandard
term1
- the term to find interm2
- the quoted term to find
AnsiStandard.caseInsensitiveRegExpSQL(java.lang.String, java.lang.String)
public String alterColumnNotNullableSQL(String tableName, Column column)
alterColumnNotNullableSQL
in interface Dbms
alterColumnNotNullableSQL
in class AnsiStandard
alterColumnNotNullableSQL(java.lang.String,
java.lang.String)
public String selectLimit(String querySelection, int limit)
selectLimit
in interface Dbms
selectLimit
in class AnsiStandard
querySelection
- main body of querylimit
- number to limit to
Dbms.selectLimit(java.lang.String, int)
public String getSqlDefaultValue(SQLType sqlType)
getSqlDefaultValue
in interface Dbms
getSqlDefaultValue
in class AnsiStandard
sqlType
- the type name
AnsiStandard.getSqlDefaultValue(org.melati.poem.SQLType)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |