1
0
mirror of https://github.com/danog/postgres.git synced 2024-12-03 09:57:48 +01:00
Commit Graph

133 Commits

Author SHA1 Message Date
Aaron Piotrowski
996b55fd93
Reintroduce Pool interface 2018-06-27 23:48:16 -05:00
Aaron Piotrowski
9135a282f7
Move isAlive() from Handle to Executor 2018-06-16 09:51:45 -05:00
Aaron Piotrowski
d81f88aa53
Discard statement if pool busy
Also reduced the time that idle statements are retained to avoid saturating the pool. This will help avoid temporary deadlocks from idle statements blocking further operations on the pool.
2018-04-22 23:39:15 -05:00
Aaron Piotrowski
8a6c2ec1e4
Define scripts in composer.json; remove Makefile; fix styles 2018-04-08 21:53:10 -05:00
Aaron Piotrowski
9269fe5a96
Move PooledStatement to Internal namespace 2018-04-08 21:40:39 -05:00
Aaron Piotrowski
6e3f1ac40d
Remove cancellation token from Connector interface
Renamed DefaultConnector to TimeoutConnector, adding a default timeout to connection attempts.
2018-04-08 16:04:14 -05:00
Aaron Piotrowski
a2318e52b9
Avoid stacked PooledStatements 2018-03-30 13:33:51 -05:00
Aaron Piotrowski
97022a4889
Refactor PooledStatement
PooledStatement now holds a collection of statements created from the pool, releasing them at the same frequency as connections are released from the pool.

Added a lastUsedAt() method to Statement.
2018-03-30 11:55:23 -05:00
Aaron Piotrowski
2340e03835
Actually remove backpressure 2018-03-30 09:39:36 -05:00
Aaron Piotrowski
d91f8054ba
Enabled unbuffered queries, but remove backpressure 2018-03-29 23:11:28 -05:00
Aaron Piotrowski
61ea8388af
lib → src 2018-03-26 23:02:35 -05:00
Aaron Piotrowski
dbca58507e
Add Connector interface; make most classes final
Connector added so Pool could be final while adding a way to alter how connections are established. connect() and pool() functions now use the global connector defined by a new function connector().

Some tests were refactored to account for final classes. AbstractPoolTest was removed as the other pool tests covered the same code with similar tests.
2018-03-26 22:08:46 -05:00
Aaron Piotrowski
616da4ac4e
Error if pecl-ev is used with ext-pgsql 2018-02-28 19:00:24 -06:00
Aaron Piotrowski
650d464ef8
Support identifiers with numbers and type casts
Named identifiers in prepared statement queries may now contain (but not begin with) numbers, i.e., :column3.

Type casts are now skipped (i.e., column_name::integer).
2018-02-04 23:06:32 -06:00
Aaron Piotrowski
33c056b635
Add PooledStatement
Removed Operation from Statement.
2018-01-25 21:49:24 -06:00
Aaron Piotrowski
b8e9d37094
Disable unbuffered results
Disabling unbuffered results for now as there appears to be a bug when unbuffered results contain arrays.
2018-01-25 00:31:52 -06:00
Aaron Piotrowski
225776c542
Automatically cast/encode statement parameters
Statement parameters are automatically cast to values expected by postgres, including encoding arrays.
2018-01-24 23:45:44 -06:00
Aaron Piotrowski
cbbe6ff815
Add support for named and ? placeholders 2018-01-23 23:00:22 -06:00
Aaron Piotrowski
56f3fa8708
Remove deprected functions and move casting switch to separate method 2018-01-23 20:02:43 -06:00
Aaron Piotrowski
0ffc33a932
Handle escaped quotes within quoted array values 2018-01-23 20:01:23 -06:00
Aaron Piotrowski
e3c295b8e5
Ensure connections closed by the server are not used 2018-01-23 19:44:24 -06:00
Aaron Piotrowski
a77e0ec22c
Drop Connection and Pool interfaces
Connection is now an abstract class and Pool is a concrete class. Removed AggregatePool as well.
2018-01-02 21:55:59 -06:00
Aaron Piotrowski
4b1c56a2b1
Automatically remove idle connections from pool 2018-01-02 16:26:28 -06:00
Aaron Piotrowski
2916fa161c
Fix typing in result sets with duplicate column names 2018-01-02 12:38:20 -06:00
Aaron Piotrowski
67b821343f
Move initial data validation out of generator parser 2017-12-18 00:17:55 -06:00
Aaron Piotrowski
82e439c111
Add parser tests and fix some bugs 2017-12-18 00:11:48 -06:00
Aaron Piotrowski
40c704faf6
Cast scalars and parse arrays 2017-12-17 15:51:40 -06:00
Aaron Piotrowski
b644e8cc7f
Fix pool connection waiting at max connections 2017-12-15 11:08:02 -06:00
Aaron Piotrowski
d979278204
Close connection on flush failure 2017-12-11 22:12:53 -06:00
Aaron Piotrowski
f0f233b8ac
Add phpstan & fix some doc issues 2017-12-11 19:10:14 -06:00
Aaron Piotrowski
ddb3b5638c
Update pool connection creation 2017-12-10 09:53:52 -06:00
Aaron Piotrowski
2d9e97aabc
Update readme 2017-12-08 20:43:05 -06:00
Aaron Piotrowski
02265884d3
Drop do*() private methods 2017-12-03 21:50:28 -06:00
Aaron Piotrowski
2d56d530cb
Fix code style 2017-12-02 19:56:40 -06:00
Aaron Piotrowski
a70c13c49e
Define target platform in composer.json and fix .travis.yml 2017-12-02 19:53:38 -06:00
Aaron Piotrowski
b3ff31ec0e
Rename TupleResult to ResultSet
Matches name in amphp/mysql.
2017-12-02 19:35:49 -06:00
Aaron Piotrowski
df149524dc
Add QueryExecutionError for diagnostics access, fixes #5 2017-12-01 10:55:58 -06:00
Aaron Piotrowski
6b65e103cf
Update export-ignore files 2017-11-22 20:35:23 -06:00
Aaron Piotrowski
6db10871a0
Test on 7.2 2017-11-22 20:35:11 -06:00
Aaron Piotrowski
35b7e664fb
Improve ReferenceQueue and better transaction ref/unref 2017-11-22 20:34:48 -06:00
Aaron Piotrowski
e709a1cb04
Replace getConnection() with extractConnection() 2017-11-22 20:34:08 -06:00
Aaron Piotrowski
8a0f967828
Restructure try/catch/finally to avoid 7.0 bug 2017-11-18 23:30:33 -06:00
Aaron Piotrowski
8dd0556a3c
Hold statements from pools 2017-11-17 23:55:16 -06:00
Aaron Piotrowski
9b5b0022e4
Rename CompletionQueue → ReferenceQueue 2017-11-17 22:00:52 -06:00
Aaron Piotrowski
a8d940dea0
Change execute() from variadic to accepting an array 2017-11-17 21:33:49 -06:00
Aaron Piotrowski
82aa0ec54f
Add option for array or object result 2017-11-16 09:43:18 -06:00
Aaron Piotrowski
7a8358ee69
Swap test query order
Temp fix for travis issues.
2017-11-06 10:18:04 -06:00
S.A.N
4ce0e715ff Link to pecl-pq (#4) 2017-11-06 13:36:00 +01:00
Aaron Piotrowski
7578aa3445
Update readme 2017-11-05 23:22:45 -06:00
Aaron Piotrowski
0deb3e4f08
Increase coverage 2017-11-05 23:06:17 -06:00