Click or drag to resize

DbSqlImageAccessor Class

This class can access images for DbImageSource from clauses of SQL statements that are provided.
Inheritance Hierarchy

Namespace:  Atalasoft.Imaging.ImageSources.Data
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
[SerializableAttribute]
public class DbSqlImageAccessor : DbCommandImageAccessor

The DbSqlImageAccessor type exposes the following members.

Constructors
  NameDescription
Protected methodDbSqlImageAccessor(SerializationInfo, StreamingContext)
From ISerializable. All properties are encrypted if encryptSerializedState was set to true in the constructor. They are encrypted using the encryptor
Public methodDbSqlImageAccessor(GetConnectionCallback, Boolean, String, String, String)
Creates an object that can be used with DbImageSource to access images stored in a database. The image streams are access by combining clauses of SQL Statements provided.
Public methodDbSqlImageAccessor(GetConnectionCallback, Boolean, String, String, String, String)
Creates an object that can be used with DbImageSource to access images stored in a database. The image streams are access by combining clauses of SQL Statements provided.
Public methodDbSqlImageAccessor(GetConnectionCallback, Boolean, String, String, String, String, String)
Creates an object that can be used with DbImageSource to access images stored in a database. The image streams are access by combining clauses of SQL Statements provided.
Public methodDbSqlImageAccessor(GetConnectionCallback, Boolean, String, String, String, String, String, String)
Creates an object that can be used with DbImageSource to access images stored in a database. The image streams are access by combining clauses of SQL Statements provided.
Public methodDbSqlImageAccessor(GetConnectionCallback, Boolean, String, String, String, String, String, String, IDictionary)
Creates an object that can be used with DbImageSource to access images stored in a database. The image streams are access by combining clauses of SQL Statements provided.
Top
Properties
  NameDescription
Public propertyDecryptor
A delegate that can decrypt a string.
(Inherited from DbCommandImageAccessor.)
Public propertyEncryptor
A delegate that can encrypt a string.
(Inherited from DbCommandImageAccessor.)
Public propertyEncryptSerializedState
Whether or not the serialized state is encrypted. Please see documentation of sub-classes to see which members are encrypted.
(Inherited from DbCommandImageAccessor.)
Public propertyExtraParameters
A copy of the extra parameters dictionary. This class does not support changing the parameters after the object has been constructed.
(Inherited from DbCommandImageAccessor.)
Public propertyFrameCountField
The name of the frame count field in the data source
Public propertyFromClause
The table that contains the images (or any valid from clause)
Protected propertyGetConnection
A delegate that can return a connection to the database.
(Inherited from DbCommandImageAccessor.)
Public propertyImageField
The name of the image field in the data source
Protected propertyImageFieldName
Returns the name of the field that contains the image stream information. If the field is an expression it must contain an as clause that names the field.
(Overrides DbCommandImageAccessorImageFieldName.)
Protected propertyNonBlankOrderByClause
Returns either the given order by clause or the primary keys if that is blank
Protected propertyNonBlankWhereClause
Returns either the given where clause or a clause that is always true, if that is blank
Public propertyOrderByClause
A valid SQL order by clause or null if the dataset should be ordered by the primary keys
Public propertyPrimaryKeyFields
The commas separated list of fields that make up the primary key of the data source
Public propertyWhereClause
A valid SQL where clause or null if all rows are to be used.
Top
Methods
  NameDescription
Protected methodAddExtraParameters
Adds any extra parameters supplied by the user that are needed to run the command.
(Inherited from DbCommandImageAccessor.)
Protected methodCreateGetFieldCommand
Creates a command that can get the given field from the row indexed by imageStreamIndex from the datasource.
Protected methodCreateGetFrameCountCommand
A command that returns the frame count for an image. If this method returns null, the frame count will be determined by decoding the image stream. If not null, this command should result in a single row dataset with the frame count in the first column. If the frame count is stored separately from the image stream, implementing this method can greatly increase performance (especially first access). This command should not be associated with any connection.
(Overrides DbCommandImageAccessorCreateGetFrameCountCommand(IDbConnection, Int32).)
Protected methodCreateGetImageRowCommand
A method that can return a command that gets a single row dataset with the image stream information at the given index. The field can either be a varbinary, binary or image type (in which case the image stream is the value of the field) or it can be a string which will be interpreted as a filename that contains the image. The command should not be associated with a connection.
(Overrides DbCommandImageAccessorCreateGetImageRowCommand(IDbConnection, Int32).)
Protected methodCreateGetImageStreamCountCommand
A command that can get the number of image streams in the source (each of which can contain multiple frames). This command should just return the number of streams (not the total frame count). The command should result in a single row dataset with the count in the first column. The command should not be associated with a connection.
(Overrides DbCommandImageAccessorCreateGetImageStreamCountCommand(IDbConnection).)
Protected methodCreateGetImageStreamCountQuery
Creates a SQL statement that can count the number of image streams. The count should be in the first column of the first row of the returned rows.
Protected methodCreateSelectFieldByRowQuery
Creates a SQL Query using Common Table Expressions that can get a specific row by index from a data source.
Protected methodCreateStreamFromDatabaseObject
Creates a stream from the object obtained from the database. If the object is a byte array, it is attached to a MemoryStream. If the object is a string, it is interpreted as a filename and an open FileStream to the file is returned. If the object is null or not able to be interpreted as a stream, this method will throw.
(Inherited from DbCommandImageAccessor.)
Protected methodDecryptIfRequested
Decrypt a string if EncryptSerializedState is true.
(Inherited from DbCommandImageAccessor.)
Protected methodEncryptIfRequested
Encrypt a string if EncryptSerializedState is true.
(Inherited from DbCommandImageAccessor.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExtractImageStream
Extracts a stream from a row of the database.
(Inherited from DbCommandImageAccessor.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetDatabaseObject(IDbCommand, Int32)
Gets the database object from the first row of the data set returned by the command from the field at
index
.
(Inherited from DbCommandImageAccessor.)
Protected methodGetDatabaseObject(IDbCommand, String)
Gets the database object from the first row of the data set returned by the command at the field named
field
.
(Inherited from DbCommandImageAccessor.)
Protected methodGetDatabaseObject(IDbCommand, DbCommandImageAccessorFieldGetter, Object)
Gets the database object from the first row of the data set returned by the command from the field at
index
which can be either a field name or an integer index.
(Inherited from DbCommandImageAccessor.)
Protected methodGetDecryptedValue
Gets the value from the serialized data and decrypts it if requested.
(Inherited from DbCommandImageAccessor.)
Protected methodGetFieldByInt
Gets a field from the datareader by passing in the index of a field.
(Inherited from DbCommandImageAccessor.)
Protected methodGetFieldByString
Gets a field from the datareader by passing in the name of the field.
(Inherited from DbCommandImageAccessor.)
Protected methodGetFieldNameFromExpression
Takes SQL field clause and returns the name of the column.
Public methodGetFrameCountInImage
The number of frames in the stream indicated by the imageStreamIndex
(Inherited from DbCommandImageAccessor.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImageStreamCount
Gets the number of image streams in this database. Each stream can contain more than one frame.
(Inherited from DbCommandImageAccessor.)
Public methodGetObjectData
Get the data to serialize for this object
(Overrides DbCommandImageAccessorGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOpen
Opens a non-open connection
(Inherited from DbCommandImageAccessor.)
Public methodReset
Reset all caches of information. If you are storing anything that is a cached from the database, release it.
(Inherited from DbCommandImageAccessor.)
Protected methodStoreEncryptedValue
Stores the value into the serialization info and encrypts it if requested.
(Inherited from DbCommandImageAccessor.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also