Package one.microstream.afs.sql
Class SqlProvider.Abstract
java.lang.Object
one.microstream.afs.sql.SqlProvider.Abstract
- All Implemented Interfaces:
SqlProvider
- Direct Known Subclasses:
SqlProviderMySql.Default
,SqlProviderOracle.Default
,SqlProviderSqlite.Default
- Enclosing interface:
- SqlProvider
public abstract static class SqlProvider.Abstract extends Object implements SqlProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.afs.sql.SqlProvider
SqlProvider.Abstract
-
Field Summary
Fields inherited from interface one.microstream.afs.sql.SqlProvider
DATA_COLUMN_NAME, DATA_COLUMN_TYPE, END_COLUMN_NAME, END_COLUMN_TYPE, IDENTIFIER_COLUMN_LENGTH, IDENTIFIER_COLUMN_NAME, IDENTIFIER_COLUMN_TYPE, START_COLUMN_NAME, START_COLUMN_TYPE
-
Constructor Summary
Constructors Constructor Description Abstract()
-
Method Summary
Modifier and Type Method Description String
catalog()
String
copyFileQuery(String sourceTableName, String targetTableName)
insert into [targetTableName] ('identifier', 'start', 'end', 'data') select ?, 'start', 'end', 'data' from [sourceTableName] where 'identifier' = ?String
deleteFileQuery(String tableName)
delete from [tableName] where 'identifier' = ?String
deleteFileQueryFromEnd(String tableName)
delete from [tableName] where 'identifier' = ? and 'end' >= ?String
deleteFileQueryFromStart(String tableName)
delete from [tableName] where 'identifier' = ? and 'start' >= ?<T> T
execute(SqlOperation<T> operation)
String
fileExistsQuery(String tableName)
select count(*) from [tableName] where 'identifier' = ?String
fileSizeQuery(String tableName)
select count(*), max('end') from [tableName] where 'identifier' = ?String
listFilesQuery(String tableName)
select distinct 'identifier' from [tableName]String
moveFileQuerySameParent(String tableName)
update [tableName] set 'identifier' = ? where 'identifier' = ?Set<String>
queryDirectories(Connection connection, String prefix)
boolean
queryDirectoryExists(Connection connection, String tableName)
String
readDataQuery(String tableName)
select from [tableName] where 'identifier' = ? order by 'end' descString
readDataQueryWithLength(String tableName)
select from [tableName] where 'identifier' = ? and 'start' < ? order by 'end' descString
readDataQueryWithOffset(String tableName)
select from [tableName] where 'identifier' = ? and 'end' >= ? order by 'end' descString
readDataQueryWithRange(String tableName)
select from [tableName] where 'identifier' = ? and 'end' >= ? and 'start' <= ? order by 'end' descString
readMetadataQuery(String tableName)
select 'start', 'end' from [tableName] where 'identifier' = ?String
readMetadataQuerySingleSegment(String tableName)
select 'start', 'end' from [tableName] where 'identifier' = ? and start <= ? and end >= ?String
schema()
void
setBlob(PreparedStatement statement, int index, InputStream inputStream, long length)
String
writeDataQuery(String tableName)
insert into [tableName] ('identifier', 'start', 'end', 'data') values (?, ?, ?, ?)
-
Constructor Details
-
Abstract
public Abstract()
-
-
Method Details
-
catalog
- Specified by:
catalog
in interfaceSqlProvider
-
schema
- Specified by:
schema
in interfaceSqlProvider
-
execute
- Specified by:
execute
in interfaceSqlProvider
-
setBlob
public void setBlob(PreparedStatement statement, int index, InputStream inputStream, long length) throws SQLException- Specified by:
setBlob
in interfaceSqlProvider
- Throws:
SQLException
-
queryDirectoryExists
- Specified by:
queryDirectoryExists
in interfaceSqlProvider
- Throws:
SQLException
-
queryDirectories
- Specified by:
queryDirectories
in interfaceSqlProvider
- Throws:
SQLException
-
fileSizeQuery
Description copied from interface:SqlProvider
select count(*), max('end') from [tableName] where 'identifier' = ?
- Specified by:
fileSizeQuery
in interfaceSqlProvider
-
listFilesQuery
Description copied from interface:SqlProvider
select distinct 'identifier' from [tableName]
- Specified by:
listFilesQuery
in interfaceSqlProvider
-
readMetadataQuery
Description copied from interface:SqlProvider
select 'start', 'end' from [tableName] where 'identifier' = ?
- Specified by:
readMetadataQuery
in interfaceSqlProvider
-
readMetadataQuerySingleSegment
Description copied from interface:SqlProvider
select 'start', 'end' from [tableName] where 'identifier' = ? and start <= ? and end >= ?
- Specified by:
readMetadataQuerySingleSegment
in interfaceSqlProvider
-
readDataQuery
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? order by 'end' desc
- Specified by:
readDataQuery
in interfaceSqlProvider
-
readDataQueryWithLength
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? and 'start' < ? order by 'end' desc
- Specified by:
readDataQueryWithLength
in interfaceSqlProvider
-
readDataQueryWithOffset
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? and 'end' >= ? order by 'end' desc
- Specified by:
readDataQueryWithOffset
in interfaceSqlProvider
-
readDataQueryWithRange
Description copied from interface:SqlProvider
select from [tableName] where 'identifier' = ? and 'end' >= ? and 'start' <= ? order by 'end' desc
- Specified by:
readDataQueryWithRange
in interfaceSqlProvider
-
fileExistsQuery
Description copied from interface:SqlProvider
select count(*) from [tableName] where 'identifier' = ?
- Specified by:
fileExistsQuery
in interfaceSqlProvider
-
deleteFileQuery
Description copied from interface:SqlProvider
delete from [tableName] where 'identifier' = ?
- Specified by:
deleteFileQuery
in interfaceSqlProvider
-
deleteFileQueryFromStart
Description copied from interface:SqlProvider
delete from [tableName] where 'identifier' = ? and 'start' >= ?
- Specified by:
deleteFileQueryFromStart
in interfaceSqlProvider
-
deleteFileQueryFromEnd
Description copied from interface:SqlProvider
delete from [tableName] where 'identifier' = ? and 'end' >= ?
- Specified by:
deleteFileQueryFromEnd
in interfaceSqlProvider
-
writeDataQuery
Description copied from interface:SqlProvider
insert into [tableName] ('identifier', 'start', 'end', 'data') values (?, ?, ?, ?)
- Specified by:
writeDataQuery
in interfaceSqlProvider
-
moveFileQuerySameParent
Description copied from interface:SqlProvider
update [tableName] set 'identifier' = ? where 'identifier' = ?
- Specified by:
moveFileQuerySameParent
in interfaceSqlProvider
-
copyFileQuery
Description copied from interface:SqlProvider
insert into [targetTableName] ('identifier', 'start', 'end', 'data') select ?, 'start', 'end', 'data' from [sourceTableName] where 'identifier' = ?
- Specified by:
copyFileQuery
in interfaceSqlProvider
-