Sign in Join
FPDoc Onlineexperiment

TSQLConnector class

In unit SQLDB

Universal connection component.

Declaration

pascal
TSQLConnector = class(TSQLConnection)

Inheritance

  1. TSQLConnector
  2. TSQLConnection
  3. TDatabase
  4. TCustomConnection
  5. TComponent
  6. TPersistent
  7. TObject

Description

TSQLConnector implements a general connection type. When switching database backends, the normal procedure is to replace one instance of TSQLConnection descendent with another, and connect all instances of TSQLQuery and TSQLTransaction to the new connection.

Using TSQLConnector avoids this: the type of connection can be set using the ConnectorType property, which is a string property. The TSQLConnector class will (in the background) create the correct TSQLConnection descendent to handle all actual operations on the database.

In all other respects, TSQLConnector acts like a regular TSQLConnection instance. Since no access to the actually used TSQLConnection descendent is available, connection-specific calls are not available.

See also

Properties

Proxyprotected
ConnectorTypepublishedName of the connection type to use.
PortpublishedPort the SQL engine is listening on.

Methods

SetForcedCloseprotected
SetTransactionprotected
DoInternalConnectprotected
DoInternalDisconnectprotected
CheckProxyprotected
CreateProxyprotected
FreeProxyprotected
StrToStatementTypeprotected
GetAsSQLTextprotected
GetHandleprotected
AllocateCursorHandleprotected
DeAllocateCursorHandleprotected
AllocateTransactionHandleprotected
PrepareStatementprotected
Executeprotected
RowsAffectedprotected
Fetchprotected
AddFieldDefsprotected
UnPrepareStatementprotected
LoadFieldprotected
LoadBlobIntoBufferprotected
FreeFldBuffersprotected
GetNextValueSQLprotected
GetTransactionHandleprotected
Commitprotected
RollBackprotected
StartDBTransactionprotected
CommitRetainingprotected
RollBackRetainingprotected
UpdateIndexDefsprotected
GetSchemaInfoSQLprotected
RefreshLastInsertIDprotected

Inherited

From TSQLConnection (60)

AddFieldDef AddFieldToUpdateWherePart ApplyFieldUpdate ApplyRecUpdate CharSet CodePage Connected ConnOptions ConstructDeleteSQL ConstructInsertSQL ConstructRefreshSQL ConstructUpdateSQL Create CreateCustomQuery CreateDB DatabaseName Destroy DoConnect DropDB EndTransaction ExecuteDirect FieldNameQuoteChars GetAsString GetConnectionCharSet GetConnectionInfo GetDBInfo GetFieldNames GetNextValue GetObjectNames GetProcedureNames GetSchemaNames GetSequenceNames GetStatementInfo GetTableNames Handle HasTable HostName InitialiseUpdateStatement KeepConnection Log LogEvent LogEvents LoginPrompt LogParams MaybeConnect OnLog OnLogin Options Params Password PortParamName RegisterStatement Role StartImplicitTransaction StartTransaction Statements Transaction UnPrepareStatements UnRegisterStatement UserName

From TDatabase (12)

CheckConnected CheckDisConnected CloseDataSets CloseTransactions Directory DoDisconnect GetConnected GetDataset GetDataSetCount IsSQLBased TransactionCount Transactions

From TCustomConnection (19)

AfterConnect AfterDisconnect BeforeConnect BeforeDisconnect Close CloseForDestroy DataSetCount DataSets DoCloseError DoLoginPrompt ForcedClose GetLoginParams InternalHandleException Loaded OnCloseError Open SetConnected SetLoginParams StreamedConnected

From TComponent (73)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.