Bugs
Search the entire project
This project's trackers
This project's forums
This project's tasks
This project's releases
This project's documents
This project's news
Project
People
Skill
Advanced search
Log In
|
New Account
Home
My Page
Projects
Code Snippets
Project Openings
Npgsql .Net Data Provider for Postgresql
Summary
Activity
Forums
Tracker
Lists
Tasks
Docs
Surveys
News
SCM
Files
[#1011000] Cache of NpgsqlConnectionStringBuilder in NpgsqlConnection always empty!
View Trackers
|
Bugs
|
Download .csv
|
Monitor
Date:
2011-02-23 12:01
Priority:
3
State:
Open
Submitted by:
Alex A Ermoshenko (
erax
)
Assigned to:
Nobody (None)
Npgsql Version:
None
Category:
Group:
Resolution:
None
Summary:
Cache of NpgsqlConnectionStringBuilder in NpgsqlConnection always empty!
Detailed description
Example code:
NpgsqlConnectionStringBuilder builder = cache[ConnectionString];
if (builder == null)
{
settings = new NpgsqlConnectionStringBuilder(ConnectionString);
cache[ConnectionString] = settings;//this line fix tis problem
}
else
{
settings = builder.Clone();
}
PS. Cache also used (only read) in property NpgsqlConnection::ConnectionString
Followup
Message
Date: 2011-02-25 15:27
Sender:
Alex A Ermoshenko
>> By providing a constructor do NpgsqlConnection you mean
>> the user would be responsible to maintain the
>> connectionstringbuilder as she likes?
Yes.
Date: 2011-02-24 15:01
Sender:
Francisco Figueiredo jr.
Maybe we should transfer the responsibility of maintaining the cache of connectionstringbuilder to the connectionstringbuilder class itself. This way, I think we would remove the duplicate code as you pointed out and would be easier to fix problems like that.
By providing a constructor do NpgsqlConnection you mean the user would be responsible to maintain the connectionstringbuilder as she likes?
Date: 2011-02-24 10:01
Sender:
Alex A Ermoshenko
Best way to optimize Npgsql usage, is providing constructor
for NpgsqlConnection with NpgsqlConnectionStringBuilder.
Date: 2011-02-23 12:07
Sender:
Alex A Ermoshenko
Probably this line best:
cache[ConnectionString] = settings.Clone();
Attached Files:
Changes:
No Changes Have Been Made to This Item