/// <summary> /// Creates a stored procedure statement. /// </summary> /// <param name="connection">Database connection.</param> /// <param name="procedureName">Procedure name.</param> /// <exception cref="ArgumentNullException">Argument is a <B>null</B> reference.</exception> public PhpSqlDbProcedure(ConnectionResource /*!*/ connection, string /*!*/ procedureName) : base("mssql statement", connection) { if (procedureName == null) { throw new ArgumentNullException("procedureName"); } this.procedureName = procedureName; }
public FullDB(ConnectionResource connectionResource) : base(connectionResource.GetStringValue()) { switch (connectionResource) { case ConnectionResource.LocalMySQL: InitLocalMySQL(); break; default: break; } }
public MysqlDbContext(ConnectionResource connectionResource) : base(EnumString.GetStringValue(connectionResource)) { switch (connectionResource) { case ConnectionResource.APIMYSQL: InitDatabaseAsync(); break; case ConnectionResource.LOCALMYSQL: InitDatabaseAsync(); break; default: break; } }
/// <summary> /// 销毁执行上下文所有相关的资源,并通知追踪器查询已经完成 /// </summary> public virtual void Dispose() { if (ConnectionResource != null) { ConnectionResource.Dispose(); } if (SyncRoot != null) { Monitor.Exit(SyncRoot); } DataReader.Dispose(); try { if (Tracing != null) { Tracing.OnComplete(); } } catch { } }
protected override ResultResource GetResult(ConnectionResource connection, IDataReader reader, bool convertTypes) { return(new MySqlResultResource(connection, reader, convertTypes)); }
/// <summary> /// Creates an instance of a result resource. /// </summary> /// <param name="connection">Database connection.</param> /// <param name="reader">Data reader from which to load results.</param> /// <param name="convertTypes">Whether to convert resulting values to PHP types.</param> /// <exception cref="ArgumentNullException">Argument is a <B>null</B> reference.</exception> public PhpSqlDbResult(ConnectionResource /*!*/ connection, IDataReader /*!*/ reader, bool convertTypes) : base(connection, reader, "mssql result", convertTypes) { // no code in here }
public Manager(ConnectionResource connectionResource) : base(connectionResource.GetStringValue()) { FullDB initDBIfNotExist = new FullDB(connectionResource); }
/// <summary> /// Creates an instance of a result resource. /// </summary> /// <param name="connection">Database connection.</param> /// <param name="reader">Data reader from which to load results.</param> /// <param name="convertTypes">Whether to convert resulting values to PHP types.</param> /// <exception cref="ArgumentNullException">Argument is a <B>null</B> reference.</exception> public MySqlResultResource(ConnectionResource /*!*/ connection, IDataReader /*!*/ reader, bool convertTypes) : base(connection, reader, "MySQL result", convertTypes) { // no code in here }
/// <summary> /// Gets a query result resource. /// </summary> /// <param name="connection">Database connection.</param> /// <param name="reader">Data reader to be used for result resource population.</param> /// <param name="convertTypes">Whether to convert data types to PHP ones.</param> /// <returns>Result resource holding all resulting data of the query.</returns> protected override ResultResource /*!*/ GetResult(ConnectionResource /*!*/ connection, IDataReader /*!*/ reader, bool convertTypes) { return(new PhpSqlDbResult(connection, reader, convertTypes)); }