Upload
phungphuc
View
214
Download
0
Embed Size (px)
Citation preview
\AtelierChkdsk\Program.cs
using System;
using System.Collections.Generic;
using System.Text;
using Atelier.Backend;
using Atelier.Common;
namespace AtelierChkdsk
{
class Program
{
static void Main(string[] args)
{
Guid EveryoneGroupGuid = Constants.Groups.AllUsers;
Guid AnonymousGuid = Constants.SpecialUsers.AnonymousUser;
using (IBackend backend = BackendFactory.Create(Constants.SpecialUsers.RootUser))
{
//add content to everyone viewable
backend.SaveChanges();
}
}
}
}
\AtelierChkdsk\bin\Debug\AtelierChkdsk.XML
AtelierChkdsk
\AtelierChkdsk\bin\Debug\Backend.xml
Backend
Determines whether or not the given node has the designated neighbor.
That is, whether or not the designated neighbor is related to the given node.
The ID of the given node
The ID of the designated neighbor
true if the deisgnated neighbor is related to the given node, false otherwise
Retrieves the value of the link between the given node and the designated neigbor.
That is, how strongly related the designated neighbor is to the given node.
The ID of the given node
The ID of the designated neighbor
A value representing the strength of the relationship.
Retrieves the global value associated with a node and a relationship,
ie: The aggregated trust value of a piece of content
The ID of the given node
A value representing the associated aggregated values of some relationship
Retrieves the global value associated with a node and a relationship,
ie: The aggregated trust value of a piece of content
The ID of the given node
A value representing the associated aggregated values of some relationship
Retrieves all the forward relationships of a given node.
That is, all content that is related to given node,
and the strength of that relationship
The ID of the given node
a dictionary of content related to the given node.
The Key-Value pairs in the dictionary have
a key that is the ID of the related node and
a value that is the strength of the relationship.
Retrieves all the backward relationships of a given node.
That is, all content that is related to given node,
and the strength of that relationship
The ID of the given node
a dictionary of content related to the given node.
The Key-Value pairs in the dictionary have
a key that is the ID of the related node and
a value that is the strength of the relationship.
Adds a neighbor with a given weight to the given node.
That is, adds a relationship between the given node
and the designated neighbor with the given strength.
the ID of the given node
A Key-Value pair representing the neighbor with
the key as the ID of the neighbor and
the value as the strenth of the relationship between the node and the neighbor
Updates the value of a relationship between the
given node and neighbor.
Removes the relationship between the given node and the designated neighbor.
the ID of the given node
the ID of the neighbor whose relationship is being removed from the given node
Interface for Notification Objects
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to
{0} said,
"{4}"about your content {2}
.
Looks up a localized string similar to PlanetTeach.com - Someone commented on "{2}".
Looks up a localized string similar to
Hi {1}!
Welcome to planet teach.
Click this link to validate your account.
.
Looks up a localized string similar to Welcome to planetteach.com.
Looks up a localized string similar to
Hi, {1}
This email is to let you know that your password has been successfully reset. Here is your new password:
{3}
You can log in now with this password, and change it from within your profile page.
.
Looks up a localized string similar to PlanetTeach.com: Your passowrd has been reset!.
Looks up a localized string similar to "This message is to inform you that you've just been schooled by PlanetTeach.com (and that notification works)".
Looks up a localized string similar to You just got schooled by PlanetTeach.com.
Looks up a localized string similar to
Dear {1},
We regret to inform you that you have been banned from PlanetTeach.com.
For varying reasons, the administration staff feels it is better for the site and for your personal benefit for you to no longer be a part of our community. If you feel this is in error, please reply to PlanetTeachBug
Have a nice day.
.
Looks up a localized string similar to You have been banned from PlanetTeach.com.
Looks up a localized string similar to
Dear {1},
We regret to inform you that your content titled {4}, created on {5} has been reported by members of our community.
We recommend the following action:
{3}
Please act on this as soon as possible. This piece of content will be blocked from public viewing until then.
Sincerely,
The PlanetTeach staff.
.
Looks up a localized string similar to PlanetTeach.com: Your content has been reported.
Looks up a localized string similar to
Dear {1},
We regret to inform you that you have been reported by members of our community for inappropriate conduct.
We recommend the following action:
{3}
Please act on this as soon as possible. Your content will be blocked from public viewing until then.
Sincerely,
The PlanetTeach staff.
.
Looks up a localized string similar to PlanetTeach.com: You have been reported.
Abstraction of an agent in the system.
Entities can be individuals or groups
of individuals.
Abstraction of all objects in the backend.
This interface defines the access control features that all IBackendObjects must support
Determines if the IBackendObject allows the specified Permission
The Permission a user is requesting
true if the operation is allowed, false otherwise
Grants the given IEntity the specified Permission to the object
The new permission added for the entity
The entity receiving permission
True if successful, false otherwise
Removes the specified Permission on this IBackendObject from the given IEntity
The permission removed
The entity losing permission
True if successful, false otherwise
Removes all Permissions on this IBackendObject from the given IEntity
The entity losing permission
True if successful, false otherwise
Retrieves a Stream which can either be written
to or read from. If there is no stream with the
given key, creates a new stream. Otherwise, retrieves
the stream with the given key. Key may be null.
Discards the old stream for the given key and creates
a new, empty one to write to.
The stream to discard.
The new stream.
The Id of this content.
The name of this object.
The date this object was created.
Gets a list of all of the tags associated with this
object.
A collection of the parent groups this object belongs to.
Retrieves a list of all reports about this backend object
Returns the entity's trust rating for another given entity.
The target entity.
The trust rating.
Returns the entity's trust rating for another given entity.
The target entity's ID.
The trust rating.
Set the entity's trust for a user.
The target entity.
Set the entity's trust for a user.
The target entity's ID.
Returns the entity's rating for a certain piece of content.
The target content.
The user's rating for the content.
Returns the entity's rating for a certain piece of content.
The target content's ID
The user's rating for the content.
Set the entity's rating for content.
The target content.
Set the entity's rating for content.
The target content's ID.
The email address of this entity.
The username of this entity.
The password for this entity to log into the system.
Determines if the entity has had its credentials validated.
Determines if this entity has been soft-deleted.
Determines if this entity's email has been banned from the system.
Contains a mapping of key-value pairs which vary based
on entity type. This property allows for new entity types
to be added to the system without changing the frontend-backend
interface.
Gets a read-only collection of the transactions a user
has participated in.
The entity's trust network.
A list of content authored by the user.
A list of comments authored by the user.
returns true if the given user has the requested permission on the target object
the permission the user is requesting
true if the operation is allowed, false otherwise
Searches the database for an entity matching the given guid and returns an
Entity object
Connection to the database
Transaction within which the database is searched and Entity populated
Guid of the Entity to find
Create a new Entity in the database with the given properties
Database connection for this transaction
Transaction within which this entity is created and stored
Email address for the entity to be created
Encrypted password for the entity to be created
Name for the entity to be created
An internal class for holding constants used in the backend
The name of the table to query.
The name of the column which serves as the key.
The name of the column which serves as the value.
Caches all of the values in the database locally in the internal dictionary.
Visitor that handles the default notifications for content
The ICategory which is the parent of this category.
A list of the child category ids of this category. Children can
be added or removed by changing the Parent property of the child.
This class determines which permissions are needed on each object of a relation to read or write that relation.
Creates a new calculator for the give RelationType
The type of relation
Determines if the predicate allows read permissions on the predicate's subject
Determines if the predicate allows read permissions on the predicate's object
Determines if the predicate allows write permissions on the predicate's subject
Determines if the predicate allows write permissions on the predicate's object
This class holds a list of permissions on a given IBackendObject and
the Guids of the IEntities that have permissions on that object. This class
is based on an IDictionary, so accesses to IEntities
that have a given permissions is a low-cost operation whereas finding the permissions
a given IEntity has is not as cheap.
The IAccessControlList provides a view of the access control data about a certain IBackendObject.
It does not enable editing but only enumeration of permissions.
Finds all of the IEntities that have the specified Permission
The Permission to search for
A collection of the Guids of IEntities that have the specified Permission
Finds all of the IEntities that have any kind of Permission
A collection of the Guids of IEntities
Returns the Permissions that an IEntity posesses
The IEntity to search for
A collection of Permissions the given IEntity posesses
The private dictionary that stores the permissions data
Creates a new instance of this class from an IDictionary.
A list of permissions on an IBackendObject
This class represents a Sparql statement which can then be
translated into a SQL query
This interface represents a query that can
be validated
The subject of the Sparql query
The predicate of the Sparql query
The object of the Sparql query
A value that may indicate the strength
of the predicate
The name of the table that this statement is put into when a
BackendQuery is searched using Backend.Search
Abstraction of an instance of content,
such as a text file or a movie.
Determines if the given entity can view this content.
The id of the entity to check.
true if the entity can view this content, false otherwiae.
Marks that the given entity has viewed this piece of content an additional time.
The entity who viewed this content.
Gets a user's personal rating of this content.
Gets a user's personal rating of this content.
Sets a user's personal rating of this content.
Sets a user's personal rating of this content.
Adds an author to this content.
Adds an author to this content.
Removes an author from this content.
Removes an author from this content.
Adds a category to this content.
Removes a category from this content.
The type of content for this piece of content;
Determines if this content should appear in the search results.
A short description of the content.
Determines if this content object has been soft-deleted.
Contains a mapping of key-value pairs which vary based
on content type. This property allows for new content types
to be added to the system without changing the frontend-backend
interface.
Determines the total number of times this piece of content has
been viewed by all users.
The price of this piece of content. It is accessible
to everyone if it is free (that is, Price = 0).
List of the IEntities who have
created this content.
List of comments (as tag objects) for this content.
List of replies to this piece of content.
The overall rating (average of all ratings) for this content.
Retrieve the content's categories.
Create a new piece of content with a new Guid and default settings
transaction within which the creation occurs (null for none)
Find a piece of content with given Guid
transaction within which the finding occurs (null for none)
Guid of the desired content
Abstraction of a single individual in the system.
Class that handles serializing notifications to and from strings
This class represents a query that can be given to the backend
to return results. A BackendQuery consists of a list of Statements
and a ResultName that indicates which variable to return.
Designates a new variable to be returned.
The name of the variable to return.
Removes the designation of a variable to be returned as a result.
The name of the variable to no longer return.
Gets a list of all variables which will be returned from the query.
Writes the transaction to the database.
IBackend.SaveChanges() still
needs to be called after calling this method.
This method is idempotent.
Adds the given content to this transaction at the given price.
The Id of this transaction.
Determines if this transaction has been saved or not.
The date this transaction occurred.
A list of all of the pieces of content being purchased
in this transaction.
The purchaser of this transaction.
The total price of this transaction.
A visitor on backend objects that computes the aggregated value according to
a discount rate and a maximum search depth
Currently, returns NegativeInfinity if there's no connection
Otherwise returns the maximal value of all paths within the depth limit
Class that handles notifications from the notifications queue.
To create one use IBackend.CreateNotificationHandlerService()
Check for pending notifications and process them
Processes the next notification in the Notifications Queue
if there are none, returns immediately
true if a notification was processesed, else returns false
This interface defines methods which give the front-end
access to information provided by the backend.
Creates a new IBackendObject from the given Guid
The Guid of the requested IBackendObject
An IBackendObject with the give Guid
Returns the object type of the IBackendObject with the given Guid.
The Guid of an IBackendObject
The type of the IBackendObject
Returns the guid of the entity with the given email
throws an ObjectNotFoundException
The entities email string
The guid of the entity
If (email, password) is a valid login, returns that User.
If not a valid login, returns null.
Email address of the user to login
Password of the user to login
A User object if login was valid, or null if not.
Finds a single entity.
The Id of the entity to find.
The desired entity, or null if it could not be found.
Finds a single user.
The Id of the user to find.
The desired user, or null if it could not be found.
Finds all the user emails which are banned from signing up.
An unmodifiable collection of email addresses.
Creates a new user in the database.
The name of the user.
The email address of the user.
The password the user uses to log into the system.
The username for the user.
The user that has been created.
Gets all the sponsors of the given user.
Id of the user.
List of sponsor ids and sponsorship levels
Gets all the users sponsored by the given user.
Id of the given user.
List of sponsored user ids and sponsorship levels
Sponsors a user.
The user id of the user who sponsors (subject).
The user id of the user who is sponsored (object).
The level at which the sponsoree is sponsored.
Finds a single content object.
The Id of the content to find.
Transation in which to load the content
The desired content. Throws if cannot find content
Creates a content object in the database.
The type of the data.
A list of all authors. Must not be empty.
The name of the content. string.IsNullOrEmpty(name) must be false.
The new IContent object.
Creates a content object in the database with the given properties.
The type of the data.
A list of all authors. Must not be empty.
The name of the content. string.IsNullOrEmpty(name) must be false.
The properties of this content
The new IContent object.
Gets a tag with the given id from the database.
The tag ID
The tag with the given ID
Creates a comment in the database, and the corresponding relations.
The target IBackendObject
The author of the tag
The title of the tag
The text of the tag
An ITag interface to the created comment.
Creates a report in the database, and the corresponding relations.
The target IBackendObject
The author of the report
The title of the report
The text of the report
The value of the report
An ITag interface to the created report.
Creates a review in the database, and the corresponding relations.
An ITag interface to the created review.
Creates a suggestion in the database, and the corresponding relations.
An ITag interface to the created suggestion.
Creates a tag in the database, and the corresponding relations.
An ITag interface to the created tag.
Extensible tag creation method. Creates a tag in the database, and the corresponding relations.
Accepts a properties dictionary to support extensibility.
An ITag interface to the created tag.
Deletes the tag with the given id, and removes all relationships to it.
The number of total number of records deleted from the database.
Gets the ICategory with the given Guid
The Guid of the ICategory to retrieve
The ICategory
Creates a new ICategory
The name of the new ICategory
The creator of the ICategory
The newly created ICategory
Creates a new relation in the database.
The subject of the relation
The object of the relation
The predicate defining the relation
The value of the relation
The newly created relation
Gets a list of all relations matching the subject and predicate.
The subject of the relation
The predicate defining the relation
A list of all relations matching the subject and predicate.
Gets a list of all relations matching the object and predicate.
The object of the relation
The predicate defining the relation
A list of all relations matching the object and predicate.
Returns the relation matching the given subject-predicate-object triple.
The subject of the relation
The predicate defining the relation
The object of the relation
The relation matching the given subject-predicate-object triple.
Removes the relation from the database with the given subject,
predicate, and object.
The subject to remove.
The predicate to remove.
The object to remove.
The number of relations deleted.
Get a collection that represents the things that have a certain relation from an object
The thing to get the collection from
The relation to search on
A collection of things that have the given relation from the source
Get a collection that represents the things that have a certain relation targeting an object
The object of a relation
The predicate of a relation
All objects that have a relation with the target and are the subject in the relation
Turns the given user into an administrator.
Idempotent.
The Id of the user to make an administrator.
Removes administrator priviliges from the given user.
Idempotent.
The user who is no longer an administrator.
Performs a SPARQL search on the relationship table.
The SPARQL query, which also contains the values to return.
A list of Dictionaries, where the key is the variable and the value is the IBackendObject at that value.
Retrieves the record of an existing transaction.
The id of the transaction.
Makes a new transaction.
A new transaction.
Creates a process to handle notifications
An IBackgroundService that represents the newly created process
Saves all of the changes which have been made to objects
retrieved from this instance of the backend. Opens up
a new transaction so that more changes can be made.
If any portion of the changes made cannot be saved,
nothing in the database is changed.
Finds the value of a system-wide property.
The key of the property.
The value of the property.
Retrieves a list of all reports from the backend.
The guid of the currently logged in user.
Used to determine whether the user has permissions to perform the
requested operations on the backend.
Assigns a new Guid based on the desired content type.
The type of the object which will have this Guid.
A new Guid.
Permanently removes database records containing the given content id.
Removes tag relations to/from the content, but does not currently remove tag
objects.
The Guid of the IContent
The number of deleted objects
Irrevocably removes database records for the given entity id.
Removes tag relations to/from entity, but does not currently remove
tag objects themselves.
The Guid of the IEntity
The number of deleted objects
Irrevocably removes the given tag and all relations to/from it.
The Guid of the ITag
The number of deleted objects
Removes all relations with the given id as a subject or object.
BEWARE - relations will be removed irrevocably from the database.
The Guid associated with the relation
The total number of relations deleted.
Removes all records from a database table with the given id
in the Id field. BEWARE - records will be removed irrevocably.
The Guid associated with the relation
The name of the database table
The total number of records deleted.
Removes all records from a database table with the given id
in the given column. BEWARE - records will be removed irrevocably.
The Guid associated with the relation
The name of the database table
The name of the table column
The total number of records deleted.
Gets the current connection to the database.
Gets the current transaction on which to perform changes.
Maintains a DB-backed set of system-wide settings.
The connection to the database for this instance.
The transaction under which all operations occur.
Flag determining if this object has been disposed
(and thus if the connection and transaction are still valid).
Creates a tag object in the database, but does not create any relationships. Use with caution.
An ITag interface to the created tag.
Retrieves the record of an existing transaction.
The id of the transaction.
Makes a new transaction.
A new transaction.
Temporarily makes this backend act like the given user was logged in
the user to impersonate
the guid of the currently logged in user, calling again with this guid changes back
executes a function on the backend as the root user
The function to run as root
Returns a collection of all the entities that the given entity is (possibly recursively) a part of
This includes the entity itself
the entity to find the containing sets for
a collection all of the entities to which the given entity belongs (including itself)
Testing Stub implementation of IGroupInfo that just returns the entity itself (as if it were not a member of any groups)
TODO: it should also include the Everyone group.
Visitor on Backend objects that does a depth first search on a
certain relation
To use, call
BackendObject.Execute(new DepthFirstSearchVisitor(backend,relationType,depthLimit));
Creates a new DepthFirstSearchVisitor which searches on the graph
of nodes created by the given relation type to the given depth
The type of relation to use as the edges for the graph search
The depth to which to search
This class is used to check IEntity permissions on IBackendObjects
This interface defines methods for access control that can be used to query permissions on
an IBackendObject
Determines if the given IEntitiy has the specified Permission on an IBackendObject
A Guid of the IBackendObject to operate on
A Guid of the IEntity to check
The Permission to check
Grants the given IEntity the specified Permission on an IBackendObject
A Guid of the IBackendObject to operate on
A Guid of the IEntity to grant permission
The Permission to grant
Removes a specified Permission granted to an IEntity on an IBackendObject
A Guid of the IBackendObject to operate on
A Guid of the IEntity to remove permission
The Permission to remove
Removes all Permissions that have been granted to an IEntity on an IBackendObject
A Guid of the IBackendObject to operate on
A Guid of the IEntity to remove permission
Creates a new instance of the class based on an IBackendInternal
The backend
Gets all IEntities that have been explicity granted the specified permission on the given IBackendObject.
Does not include any inherited permissions.
A Guid of IBackendObject to check
The Permission to search for
A list of Guids of the IEntities that have the given permission on the IBackendObject
Determines if a given IEntity is a descendent of another IEntity
A Guid of an IEntity that might be an ancestor
A Guid of an IEntity that might be a descendant
True if the two IEntities are related, false otherwise
A tag to define a relationship between two pieces of content,
be it as simple as text to text or video to video.
The IEntity that created this tag.
The text/content of this tag.
Determines the type of this tag, and specifically
what type of data is stored in the dictionary.
Contains a mapping of key-value pairs which vary based
on tag type. This property allows for new tag types
to be added to the system without changing the frontend-backend
interface.
The IBackendObject to which this tag is attached.
The IBackendObject that represents the source of this tag.
Finds the tag with the given id.
Creates a new tag in the database.
Converts a backend query object into a sql query string.
Contains the lookup for how to use each predicate value.
The query object.
Converts the query into a string.
The generated string.
see GenerateSql();
Creates an "Order By" clause describing
the way to sort the results.
Creates the "Where" clause describing all of the
relationships.
The " WHERE ..." clause.
Assigns all of the tables an alias in the range
{t0 ... tn} where n is the number of tables.
The "from" clause containing all of the tables.
Writes the string which determines what to extract out of the query.
Gets the collection of objects from which a given backendObject inherits permissions directly (parents only).
the backend object to find parents of
a collection of the backend objects from which the given one derives permissions
Gets the collection of all objects from which a given backendObject inherits permissions (all parents and ancestors).
the backend object to find parents of
a collection of the backend objects from which the given one derives permissions
Testing stub implementation of IObjectInheritanceInfo that returns only the object itself (as if it didn't inherit permissions from anywhere)
Class that encapsulates some special things that are required for PostgreSql and
the Data table
Creates a new row in the data table and creates a new large object to save data into
the database connectiont to use (must be NpgsqlConnection)
the transaction this operates within
the id of the object this data stream will belong to
the key string for this data stream
Removes the data with the current oid and adds a new, empty stream.
The connection to use.
The transaction to use.
The id of the object getting a new stream.
The version of the stream to replace.
The oid of the current stream.
The oid of the new stream.
Class that implements a stream interface to the data objects in PostgreSql
Visitor that handles the default notification for tags
Returns a string of the StatementMember
in relation to another StatementMember
The StatementMember to be compared against
A SQL string that compares this StatementMember to
The value stored in this StatementMember
True if this statement member is a variable,
false otherwise
Determines if the statement should print in a
Where clause.
The name of the column that this statement member correpsonds to.
The way that this column relates to the values.
This should be ComparisonType.Equals most of the time.
Determines if this values is used to sort, the order
of precedence it takes, and the direction of sorting.
Determines the order this value is set in the Order By clause.
1 is processed first; 2 is next. Values less than 1 mean that the
value is not used to order the results.
Determines if the results are ordered Ascending (true)
or Descending (false). Defaults to true.
The transaction of which this is a member.
The id of the content being purchased.
The price of the content.
Class that handles actually sending email messages to user targets.
Formats the message from title and message strings and sends.
Represents the end-point of a notification
Concrete implementors can then handle to the details of actually sending
the message to the entity
Sends a message with the given title and message body
short text title of the message
body of the message
Creates a new Smtp Notification Target
the user who will recieve messages sent to this target
Finds the Category with the given id.
Creates a new category in the database.
This class is the authentication system that is used by the WebApp. This system provides
hook functions to check whether a user is logged in or out, or to perform the action of
logging in a user.
This function returns whether a user is logged in or not given the HttpRequest object.
The HttpRequest object
User's logged in state
This returns the user Id of the logged in user given the request object.
The Httprequest that stores cookie information.
The Guid of the logged in user, if user is logged in
Gets the current user guid if logged in
else the guid for the anonymous user
The HttpRequest object for the request
Guid of the logged in user or the anonymous guid
Create a new relation in the database
Constructor which finds the given triple in the relations table
and creates a BackendRelation from those values.
Initializes a BackendRelation object with the given values. It is assumed the values were
already gotten from the database and are valid -- USE WITH CAUTION.
Provides an access point to the backend for all code
not part of the backend.
Accessor for the front-end code to the current implementation
of the backend.
Private constructor; no need to create instances of this class.
Visitor to handle notifications that sends them to a notification
target in a default way
\AtelierChkdsk\bin\Debug\Common.xml
Common
LobStream is a base class for classes that exchange large volumes of data with a database.
The LobStream class implements the ILobStream interface and descends from System.IO.Stream.
The following is taken from the Microsoft website at http://msdn2.microsoft.com/en-us/library/system.io.stream.aspx
Streams involve three fundamental operations:
- You can read from streams. Reading is the transfer of data from a stream into a data structure, such as an array of bytes.
- You can write to streams. Writing is the transfer of data from a data structure into a stream.
- Streams can support seeking. Seeking is the querying and modifying of the current position within a stream. Seek capability depends on the kind of backing store a stream has. For example, network streams have no unified concept of a current position, and therefore typically do not support seeking.
Stream is the abstract base class of all streams. A stream is an abstraction of a sequence of bytes, such as a file, an input/output device, an inter-process communication pipe, or a TCP/IP socket. The Stream class and its derived classes provide a generic view of these different types of input and output, isolating the programmer from the specific details of the operating system and the underlying devices.
Depending on the underlying data source or repository, streams might support only some of these capabilities. An application can query a stream for its capabilities by using the CanRead, CanWrite, and CanSeek properties.
The Read and Write methods read and write data in a variety of formats. For streams that support seeking, use the Seek and SetLength methods and the Position and Length properties to query and modify the current position and length of a stream.
Some stream implementations perform local buffering of the underlying data to improve performance. For such streams, the Flush method can be used to clear any internal buffers and ensure that all data has been written to the underlying data source or repository.
Calling Close on a Stream flushes any buffered data, essentially calling Flush for you. Close also releases operating system resources such as file handles, network connections, or memory used for any internal buffering. The BufferedStream class provides the capability of wrapping a buffered stream around another stream in order to improve read and write performance.
If you need a stream with no backing store (also known as a bit bucket), use Null.
Notes to Implementers: When implementing a derived class of Stream, you must provide implementations for the Read and Write methods. The asynchronous methods BeginRead, EndRead, BeginWrite, and EndWrite are implemented through the synchronous methods Read and Write. Similarly, your implementations of Read and Write will work correctly with the asynchronous methods. The default implementations of ReadByte and WriteByte create a new single-element byte array, and then call your implementations of Read and Write. When deriving from Stream, if you have an internal byte buffer, it is strongly recommended that you override these methods to access your internal buffer for substantially better performance. You must also provide implementations of CanRead, CanSeek, CanWrite, Flush, Length, Position, Seek, and SetLength. Do not override the Close method, instead, put all of the Stream cleanup logic in the Dispose method. For more information, see Implementing a Dispose Method.
ILobStream is an interface that must be implemented by all classes
that exchange lobs with a database.
Parameterless constructor.
Constructor with parameter to accomodate for all user-supplied information.
The connection through which the read/write operations will take place
The database table that stores the lob
The column that holds the value that uniquely identifies the lob
The column that holds the lob itself
The value in the keyColumn that uniquely identifies the lob
Whether this stream is writable
You should release all resources by specifying true for disposing. When disposing is true, the stream can also ensure data is flushed to the underlying buffer, and access other finalizable objects. This may not be possible when called from a finalizer due a lack of ordering among finalizers.
If your stream is using an operating system handle to communicate with its source, consider using a subclass of SafeHandle for this purpose.
This method is called by the public Dispose method and the Finalize method. Dispose invokes the protected Dispose method with the disposing parameter set to true. Finalize invokes Dispose with disposing set to false.
Use C# destructor syntax for finalization code.
This destructor will run only if the Dispose method does not get called.
It gives your base class the opportunity to finalize.
Do not provide destructors in types derived from this class.
Looks up the exact position in the stream, based on the offset value and
the starting position defined by SeekOrigin.
a long value, indicating the position in the stream.
Overrides the Read method of System.IO.Stream, but
is not implemented here, since the implementation has to
database-specific.
an integer indicating the number of bytes read
Overrides the Write method of System.IO.Stream, but is not implemented here,
since the implementation has to be database-specific.
Some stream implementations perform local buffering of the underlying data to improve performance.
For such streams, the Flush method can be used to clear any internal buffers and ensure that all data
has been written to the underlying data source or repository.
SetLength is not implemented in LobStream.
Writes the lob to another stream, after reading it from the database.
Overloaded method of WriteTo, writing the lob to another stream.
This methods read bufferSize bytes from the source stream, and
writes it to this stream (= stores it in the underlying database).
Note that this method accepts also an empty stream. In this case, the result is that
nothing is written to the underlying database, leaving the target lob field unchanged.
The source stream
Indicates if the source stream has to be closed when reading finishes
The size of the buffer that is read each time
This overload of ReadFrom actually calls the base implementation
of ReadFrom and passes in the following parameters:
- source: the source stream
- closeWhenFinished: a boolean value of true
- bufferSize: a long indicating the size of the buffer
The stream to read from
This overload of ReadFrom method reads a byte array, passed in as a parameter, and
writes its contents to this lob stream.
A byte array
The lob is returned as a byte array.
a byte array
Fills the passed in byte array with the lob.
Note that the [In, Out] attributes require the use of the System.Runtime.InteropServices namespace.
A byte array that is exchanged between calling code and this method
BufferSize is the size of the chunks that are read and written.
The Microsoft documentation learns that a multiple of 8040 bytes is
best for optimal performance.
The position in the stream, expressed as a long.
The IsValid property tracks if the lob stream is valid.
By convention, a lob stream can only be valid if it points to exactly one
value in the database. Therefore, lob values are best indicated by keys that
do have a unique constraint or a primary key constraint defined on them.
If the result from the Validate command is different from 1, the lob stream
is not valid.
The Validate command has to count the number of records that are returned for
the given TableName, LobColumn, KeyColumn and LobID.
This command must be properly implemented by the subclasses.
The Validate command is used by the IsValid property to validate the lob stream.
The Visitor Host is the main object that visitors execute the appropriate algorithm, based on the particular case
matched by this object.
Index type of the case selector.
This recursive type reference allows the implementing Visitor Host class to specify itself as the host type.
The Visitor is a dictionary of commands keyed by an index of type .
When a Visitor Host executes a Visitor, a command is matched to the Host's index and then executed.
If no commands match the Host index, the default command is executed.
Return type for Visitor commands.
Index type of the case selector.
Parameter type for arguments passed to executing command.
Host type supporting execution of this Visitor; must derive from the Visitor Host interface.
A Visitor Command contains the abstract algorithm code for a particular case matched by an executing Visitor.
Return type for the command.
Index type of the case selector.
Parameter type for arguments passed to the command.
Host type supporting execution of this Visitor command; must derive from the Visitor Host interface.
Host executing this Visitor command.
Specific case the Visitor matched with the Host.
Parameters supplied at execution time.
Return value of the Visitor command
The Visitor is a dictionary of commands keyed by an index of type .
When a Visitor Host executes a Visitor, a command is matched to the Host's index and then executed.
If no commands match the Host index, the default command is executed.
Return type for Visitor commands.
Index type of the case selector.
Parameter type for arguments passed to executing command.
Host type supporting execution of this Visitor; must derive from the Visitor Host interface.
Contains methods for permanently encrypting/hashing passwords (strings).
Passwords should be PermanentEncrypt-ed when being stored/compared to the database.
Permanently encrypts/hashes a password (string) for storage in the database as a Byte[].
To match passwords from the UI, encrypt with this method and then match the result
to the password field in the database.
Returns a Byte[] of the encrypted/hashed password (string).
Password (string) to encrypt/hash
Guid to salt password with
Compares two encrypted/hashed passwords and returns true if they match.
A password encrypted/hashed via PermanentEncrypt
A password encrypted/hashed via PermanentEncrypt
True if p1 matches p2, false otherwise.
A wrapper class for an integer that allows it to be a host for an IVisitor.
The actual value of the wrapped integer
Constructor for an Integer Host
The integer to wrap around
Executes an IVisitor on this host.
The return value of executing the IVisitor.
The type of the parameter that can be passed in to the IVisitor.
The IVisitor that is executing on this host.
Parameters being passed in to the executing IVisitor.
Getter for the wrapped value.
The SqlLobStreamFromVarBinary class is a descendent from LobStream. SqlLobStreamFromVarBinary manages the
exchange of lobs with a SQL Server database that has stored the lobs in a VarBinary column.
Writes the lob to a destination stream.
The stream to write to
Indicates if the lob stream must be closed afterwards
The size of the buffer
BinaryReader object depends on this Read method.
byte array
starting position in the buffer
number of bytes to manipulate
The number of bytes read.
The overriding Write method of SqlLobStreamFromVarBinary
byte array
starting position in the buffer
number of bytes to manipulate
SqlCommand that is responsible to write the data to the underlying database ...
Marker defining the object which a user must have permissions on in order to be an administrator.
Defines a set of constant guids representing top-level groups.
Determines if the given guid is one of the defined constants
in this class.
The guid to check
Constants that determine the permissions
returned by the RelationsPermissionsCalculator
to determine what permissions you need to do something
Defines a enum with helper methods for converting between Strings and Enumertaions for describing fields
of a content object
Enumerations for ContentFields
Mapping of database values to different content types.
The different types of possible reports.
A report that requires attention.
A report that is waiting on a response.
A report on content.
A report on an entity.
A report that is considered closed.
All reports.
Interface to represent a general background service
Checks if there is work to do, and do it
True if any operations were performed, false otherwise
LobDataType is an enumeration of the possible large object types in a database. The enumeration
combines that type of database and the data type of the column that holds the lob.
Reads data from a stream until the end is reached. The
data is returned as a byte array. An IOException is
thrown if any of the underlying IO calls fail.
Borrowed with modifications from http://www.yoda.arachsys.com/csharp/readbinary.html
The stream to read data from
LobStreamFactory is a factory class to return the appropriate lob stream class,
based on the data type of the lob.
The advantage of using a factory class is that the actual implementation of the lob stream
class can change overtime, without affecting the client code.
CreateLobStream creates and returns the lob stream class, based
on the lob data type.
The data type of the blob
An instance of the LobStream class
This function is an overload of CreateLobStream(LobDataType). The function
returns a LobStream with the essential properties (as defined in ILobStream)
already set to a proper value.
A member of the LobDataType enumeration
An open connection
The name of the table holding the lob
The name of the column that holds the unique row identifier
The name of the column that holds the lob
The value (string) of the row identifier
An instance of the LobStream class
This function is an overload of CreateLobStream(LobDataType). The function
returns a LobStream where the Connection property is manually set based on
the provided connectionString parameter.
A member of the LobDataType enumeration
The connection string for accessing the database
The name of the table holding the lob
The name of the column that holds the unique row identifier
The name of the column that holds the lob
The value (string) of the row identifier
An instance of the LobStream class
\AtelierChkdsk\bin\Debug\Npgsql.xml
Npgsql
Called from constructor of derived class.
Finalizer for HashAlgorithm
Computes the entire hash of all the bytes in the byte array.
When overridden in a derived class, drives the hashing function.
When overridden in a derived class, this pads and hashes whatever data might be left in the buffers and then returns the hash created.
When overridden in a derived class, initializes the object to prepare for hashing.
Used for stream chaining. Computes hash as data passes through it.
The buffer from which to grab the data to be copied.
The offset into the input buffer to start reading at.
The number of bytes to be copied.
The buffer to write the copied data to.
At what point in the outputBuffer to write the data at.
Used for stream chaining. Computes hash as data passes through it. Finishes off the hash.
The buffer from which to grab the data to be copied.
The offset into the input buffer to start reading at.
The number of bytes to be copied.
Get whether or not the hash can transform multiple blocks at a time.
Note: MUST be overriden if descendant can transform multiple block
on a single call!
Gets the previously computed hash.
Returns the size in bits of the hash.
Must be overriden if not 1
Must be overriden if not 1
Common base class for all derived MD5 implementations.
Called from constructor of derived class.
Creates the default derived class.
C# implementation of the MD5 cryptographic hash function.
Creates a new MD5CryptoServiceProvider.
Drives the hashing function.
Byte array containing the data to hash.
Where in the input buffer to start.
Size in bytes of the data in the buffer to hash.
This finalizes the hash. Takes the data from the chaining variables and returns it.
Resets the class after use. Called automatically after hashing is done.
This is the meat of the hash function. It is what processes each block one at a time.
Byte array to process data from.
Where in the byte array to start processing.
Pads and then processes the final block.
Buffer to grab data from.
Position in buffer in bytes to get data from.
How much data in bytes in the buffer to use.
This class represents the AsciiRow (version 2) and DataRow (version 3+)
message sent from the PostgreSQL server.
This is the abstract base class for NpgsqlAsciiRow and NpgsqlBinaryRow.
Provide access to the fields in this row.
This class represents a BackEndKeyData message received
from PostgreSQL
This class represents the BinaryRow message sent from the PostgreSQL
server. This is unused as of protocol version 3.
This class represents the Bind message sent to PostgreSQL
server.
This class represents the CancelRequest message sent to PostgreSQL
server.
This class represents the base class for the state pattern design pattern
implementation.
This method is used by the states to change the state of the context.
This method is responsible to handle all protocol messages sent from the backend.
It holds all the logic to do it.
To exchange data, it uses a Mediator object from which it reads/writes information
to handle backend requests.
Resolve a host name or IP address.
This is needed because if you call Dns.Resolve() with an IP address, it will attempt
to resolve it as a host name, when it should just convert it to an IP address.
Represents a SQL statement or function (stored procedure) to execute
against a PostgreSQL database. This class cannot be inherited.
Initializes a new instance of the NpgsqlCommand class.
Initializes a new instance of the NpgsqlCommand class with the text of the query.
The text of the query.
Initializes a new instance of the NpgsqlCommand class with the text of the query and a NpgsqlConnection.
The text of the query.
A NpgsqlConnection that represents the connection to a PostgreSQL server.
Initializes a new instance of the NpgsqlCommand class with the text of the query, a NpgsqlConnection, and the NpgsqlTransaction.
The text of the query.
A NpgsqlConnection that represents the connection to a PostgreSQL server.
The NpgsqlTransaction in which the NpgsqlCommand executes.
Used to execute internal commands.
Attempts to cancel the execution of a NpgsqlCommand.
This Method isn't implemented yet.
Create a new command based on this one.
A new NpgsqlCommand object.
Create a new connection based on this one.
A new NpgsqlConnection object.
Creates a new instance of an IDbDataParameter object.
An IDbDataParameter object.
Creates a new instance of a NpgsqlParameter object.
A NpgsqlParameter object.
Executes a SQL statement against the connection and returns the number of rows affected.
The number of rows affected.
Sends the CommandText to
the Connection and builds a
NpgsqlDataReader.
A NpgsqlDataReader object.
Sends the CommandText to
the Connection and builds a
NpgsqlDataReader
using one of the CommandBehavior values.
One of the CommandBehavior values.
A NpgsqlDataReader object.
Sends the CommandText to
the Connection and builds a
NpgsqlDataReader.
A NpgsqlDataReader object.
Sends the CommandText to
the Connection and builds a
NpgsqlDataReader
using one of the CommandBehavior values.
One of the CommandBehavior values.
A NpgsqlDataReader object.
Currently the CommandBehavior parameter is ignored.
This method binds the parameters from parameters collection to the bind
message.
Executes the query, and returns the first column of the first row
in the result set returned by the query. Extra columns or rows are ignored.
The first column of the first row in the result set,
or a null reference if the result set is empty.
Creates a prepared version of the command on a PostgreSQL server.
This method checks the connection state to see if the connection
is set or it is open. If one of this conditions is not met, throws
an InvalidOperationException
This method substitutes the Parameters, if exist, in the command
to their actual values.
The parameter name format is :ParameterName.
A version of CommandText with the Parameters inserted.
This methods takes a string with a function call witch returns a refcursor or a set of
refcursor. It will return the names of the open cursors/portals which will hold
results. In turn, it returns the string which is needed to get the data of this cursors
in form of one resultset for each cursor open. This way, clients don't need to do anything
else besides calling function normally to get results in this way.
Gets or sets the SQL statement or function (stored procedure) to execute at the data source.
The Transact-SQL statement or stored procedure to execute. The default is an empty string.
Gets or sets the wait time before terminating the attempt
to execute a command and generating an error.
The time (in seconds) to wait for the command to execute.
The default is 20 seconds.
Gets or sets a value indicating how the
CommandText property is to be interpreted.
One of the CommandType values. The default is CommandType.Text.
Gets or sets the NpgsqlConnection
used by this instance of the NpgsqlCommand.
The connection to a data source. The default value is a null reference.
Gets the NpgsqlParameterCollection.
The parameters of the SQL statement or function (stored procedure). The default is an empty collection.
Gets or sets the NpgsqlTransaction
within which the NpgsqlCommand executes.
The NpgsqlTransaction.
The default value is a null reference.
Gets or sets how command results are applied to the DataRow
when used by the Update
method of the DbDataAdapter.
One of the UpdateRowSource values.
Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0.
This class is responsible to create database commands for automatic insert, update and delete operations.
This method is reponsible to derive the command parameter list with values obtained from function definition.
It clears the Parameters collection of command. Also, if there is any parameter type which is not supported by Npgsql, an InvalidOperationException will be thrown.
Parameters name will be parameter1, parameter2, ...
For while, only parameter name and NpgsqlDbType are obtained.
NpgsqlCommand whose function parameters will be obtained.
Represents the method that handles the Notice events.
A NpgsqlNoticeEventArgs that contains the event data.
Represents the method that handles the Notification events.
The source of the event.
A NpgsqlNotificationEventArgs that contains the event data.
This class represents a connection to a
PostgreSQL server.
Initializes a new instance of the
NpgsqlConnection class.
Initializes a new instance of the
NpgsqlConnection class
and sets the ConnectionString.
The connection used to open the PostgreSQL database.
Begins a database transaction.
An IDbTransaction
object representing the new transaction.
Currently there's no support for nested transactions.
Begins a database transaction with the specified isolation level.
The isolation level under which the transaction should run.
An IDbTransaction
object representing the new transaction.
Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend.
There's no support for nested transactions.
Begins a database transaction.
A NpgsqlTransaction
object representing the new transaction.
Currently there's no support for nested transactions.
Begins a database transaction with the specified isolation level.
The isolation level under which the transaction should run.
A NpgsqlTransaction
object representing the new transaction.
Currently the IsolationLevel ReadCommitted and Serializable are supported by the PostgreSQL backend.
There's no support for nested transactions.
Opens a database connection with the property settings specified by the
ConnectionString.
This method changes the current database by disconnecting from the actual
database and connecting to the specified.
The name of the database to use in place of the current database.
Releases the connection to the database. If the connection is pooled, it will be
made available for re-use. If it is non-pooled, the actual connection will be shutdown.
Creates and returns a IDbCommand
object associated with the IDbConnection.
A IDbCommand object.
Creates and returns a NpgsqlCommand
object associated with the NpgsqlConnection.
A NpgsqlCommand object.
Releases all resources used by the
NpgsqlConnection.
true when called from Dispose();
false when being called from the finalizer.
Create a new connection based on this one.
A new NpgsqlConnection object.
Create a new connection based on this one.
A new NpgsqlConnection object.
Default SSL CertificateSelectionCallback implementation.
Default SSL CertificateValidationCallback implementation.
Default SSL PrivateKeySelectionCallback implementation.
Write each key/value pair in the connection string to the log.
Returns the schema collection specified by the collection name.
The collection name.
The collection specified.
Returns the schema collection specified by the collection name filtered by the restrictions.
The collection name.
The restriction values to filter the results. A description of the restrictions is contained
in the Restrictions collection.
The collection specified.
Occurs on NoticeResponses from the PostgreSQL backend.
Occurs on NotificationResponses from the PostgreSQL backend.
Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate.
Mono.Security.Protocol.Tls.CertificateValidationCallback delegate.
Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate.
Backend server host name.
Backend server port.
If true, the connection will attempt to use SSL.
Gets the time to wait while trying to establish a connection
before terminating the attempt and generating an error.
The time (in seconds) to wait for a connection to open. The default value is 15 seconds.
Gets the time to wait before closing unused connections in the pool if the count
of all connections exeeds MinPoolSize.
If connection pool contains unused connections for ConnectionLifeTime seconds,
the half of them will be closed. If there will be unused connections in a second
later then again the half of them will be closed and so on.
This strategy provide smooth change of connection count in the pool.
The time (in seconds) to wait. The default value is 15 seconds.
Gets the name of the current database or the database to be used after a connection is opened.
The name of the current database or the name of the database to be
used after a connection is opened. The default value is the empty string.
Gets flag indicating if we are using Synchronous notification or not.
The default value is false.
Gets the current state of the connection.
A bitwise combination of the ConnectionState values. The default is Closed.
Version of the PostgreSQL backend.
This can only be called when there is an active connection.
Protocol version in use.
This can only be called when there is an active connection.
The connector object connected to the backend.
Gets the NpgsqlConnectionString containing the parsed connection string values.
User name.
Password.
Determine if connection pooling will be used for this connection.
Represents a connection string.
Return an exact copy of this NpgsqlConnectionString.
This method parses a connection string and returns a new NpgsqlConnectionString object.
Report whether a value with the provided key name exists in this connection string.
Return a clean string representation of this connection string.
Return a string value from the current connection string, even if the
given key is not in the string or if the value is null.
Return a string value from the current connection string, even if the
given key is not in the string or if the value is null.
Return an integer value from the current connection string, even if the
given key is not in the string or if the value is null.
Throw an appropriate exception if the value cannot be coerced to an integer.
Return an integer value from the current connection string, even if the
given key is not in the string or if the value is null.
Throw an appropriate exception if the value cannot be coerced to an integer.
Return an integer value from the current connection string, even if the
given key is not in the string or if the value is null.
Throw an appropriate exception if the value cannot be coerced to an integer.
Return an integer value from the current connection string, even if the
given key is not in the string.
Throw an appropriate exception if the value cannot be coerced to an integer.
Return a boolean value from the current connection string, even if the
given key is not in the string.
Throw an appropriate exception if the value is not recognized as a boolean.
Return a boolean value from the current connection string, even if the
given key is not in the string.
Throw an appropriate exception if the value is not recognized as a boolean.
Return a ProtocolVersion from the current connection string, even if the
given key is not in the string.
Throw an appropriate exception if the value is not recognized as
integer 2 or 3.
Case insensative accessor for indivual connection string values.
Know connection string keys.
Connection string default values.
!!! Helper class, for compilation only.
Connector implements the logic for the Connection Objects to
access the physical connection to the database, and isolate
the application developer from connection pooling internals.
Constructor.
Controls whether the connector can be shared.
This method checks if the connector is still ok.
We try to send a simple query text, select 1 as ConnectionTest;
This method is responsible for releasing all resources associated with this Connector.
This method is responsible to release all portals used by this Connector.
Check for mediator errors (sent by backend) and throw the appropriate
exception if errors found. This needs to be called after every interaction
with the backend.
Check for notices and fire the appropiate events.
This needs to be called after every interaction
with the backend.
Check for notifications and fire the appropiate events.
This needs to be called after every interaction
with the backend.
Check for errors AND notifications in one call.
Default SSL CertificateSelectionCallback implementation.
Default SSL CertificateValidationCallback implementation.
Default SSL PrivateKeySelectionCallback implementation.
This method is required to set all the version dependent features flags.
SupportsPrepare means the server can use prepared query plans (7.3+)
Opens the physical connection to the server.
Usually called by the RequestConnector
Method of the connection pool manager.
Closes the physical connection to the server.
Returns next portal index.
Returns next plan index.
Occurs on NoticeResponses from the PostgreSQL backend.
Occurs on NotificationResponses from the PostgreSQL backend.
Mono.Security.Protocol.Tls.CertificateSelectionCallback delegate.
Mono.Security.Protocol.Tls.CertificateValidationCallback delegate.
Mono.Security.Protocol.Tls.PrivateKeySelectionCallback delegate.
Gets the current state of the connection.
Version of backend server this connector is connected to.
Backend protocol version in use by this connector.
The physical connection stream to the backend.
The physical connection socket to the backend.
Reports if this connector is fully connected.
The connection mediator.
Report if the connection is in a transaction.
Report whether the current connection can support prepare functionality.
This class manages all connector objects, pooled AND non-pooled.
Unique static instance of the connector pool
mamager.
Map of index to unused pooled connectors, avaliable to the
next RequestConnector() call.
This hashmap will be indexed by connection string.
This key will hold a list of queues of pooled connectors available to be used.
Timer for tracking unused connections in pools.
Searches the shared and pooled connector lists for a
matching connector object or creates a new one.
The NpgsqlConnection that is requesting
the connector. Its ConnectionString will be used to search the
pool for available connectors.
A connector object.
Find a pooled connector. Handle locking and timeout here.
Find a pooled connector. Handle shared/non-shared here.
Releases a connector, possibly back to the pool for future use.
Pooled connectors will be put back into the pool if there is room.
Shared connectors should just have their use count decremented
since they always stay in the shared pool.
The connector to release.
Force the connector to close, even if it is pooled.
Release a pooled connector. Handle locking here.
Release a pooled connector. Handle shared/non-shared here.
Create a connector without any pooling functionality.
Find an available pooled connector in the non-shared pool, or create
a new one if none found.
Find an available shared connector in the shared pool, or create
a new one if none found.
Close the connector.
Connector to release
Put a pooled connector into the pool queue.
Connector to pool
Stop sharing a shared connector.
Connector to unshare
A queue with an extra Int32 for keeping track of busy connections.
The number of pooled Connectors that belong to this queue but
are currently in use.
Represents the method that handles the RowUpdated events.
The source of the event.
A NpgsqlRowUpdatedEventArgs that contains the event data.
Represents the method that handles the RowUpdating events.
The source of the event.
A NpgsqlRowUpdatingEventArgs that contains the event data.
This class represents an adapter from many commands: select, update, insert and delete to fill Datasets.
Provides a means of reading a forward-only stream of rows from a PostgreSQL backend. This class cannot be inherited.
Releases the resources used by the NpgsqlCommand.
Releases the resources used by the NpgsqlCommand.
Closes the data reader object.
Advances the data reader to the next result, when multiple result sets were returned by the PostgreSQL backend.
True if the reader was advanced, otherwise false.
Advances the data reader to the next row.
True if the reader was advanced, otherwise false.
Returns a System.Data.DataTable that describes the column metadata of the DataReader.
Return the column name of the column at index .
Return the data type OID of the column at index .
FIXME: Why this method returns String?
Return the data type name of the column at index .
Return the data type of the column at index .
Return the data DbType of the column at index .
Return the data NpgsqlDbType of the column at index .
Return the value of the column at index .
Copy values from each column in the current row into .
The number of column values copied.
Return the column name of the column named .
Gets the value of a column as Boolean.
Gets the value of a column as Byte. Not implemented.
Gets raw data from a column.
Gets the value of a column as Char. Not implemented.
Gets raw data from a column.
Gets the value of a column converted to a Guid. Not implemented.
Gets the value of a column as Int16.
Gets the value of a column as Int32.
Gets the value of a column as Int64.
Gets the value of a column as Single.
Gets the value of a column as Double.
Gets the value of a column as String.
Gets the value of a column as Decimal.
Gets the value of a column as DateTime.
Not implemented.
Report whether the value in a column is DBNull.
This methods parses the command text and tries to get the tablename
from it.
Gets a value indicating the depth of nesting for the current row. Always returns zero.
Gets a value indicating whether the da