February 02, 2017
On 02/02/2017 04:33 AM, Suliman wrote:
> ResultSet querySet(Connection conn, string sql, ColumnSpecialization[]
> csa = null)
>
> Could you explain last parameter?
>
> `ColumnSpecialization[] csa = null`. I can't understand how to use it.
>

The vast majority of the time, you don't need to worry about that parameter, just omit it. It's just for if the fields you're pulling from the DB are very, very large and you want to handle the data as it comes in, rather than waiting for all the data to download. If you want to know more, it's in the documentation here:

http://semitwist.com/mysql-native-docs/v0.2.0-preview1/mysql/protocol/extra_types/ColumnSpecialization.html

>
> Also I think it's better to remove old deprecated methods at all,
> because it's add only mess.

They're still there for new just for backwards compatibility. But they are deprecated and will be removed in a later release.
February 02, 2017
On 02/02/2017 02:22 AM, Suliman wrote:
> Am I right understand that if I use pool I can create connection
> instance one time in DB class constructor end every new connection
> will be created on demand?

No. You create the pool once (wherever/whenever you want to). Then, every time you want to use the database you obtain a connection by calling MySqlPool.lockConnection.

>
> Ok, I read articles about pool, as I understood it's depend on of the
> implementation. For example method `close` in pool mode should not close
> connection, but return it to pool.
>

Calling 'close' will always close the connection. If you got you connection from the pool, then it will automatically return to the pool when you're no longer using it. No need to do anything special for that.

> Could you tell about your implementation. Also actual question is can I
> open connection in constructor (during class instance creation) ?

You can open a connection in a constructor if you wish. Or wherever you want to.
February 02, 2017
On 02/02/2017 09:46 AM, Suliman wrote:
> Could you explain real case if rangification of ResultSet
>
> http://semitwist.com/mysql-native-docs/v0.2.0-preview1/mysql/result/ResultSet.html
>
>
> Does it's mean that I can write
> foreach(x;result.empty) ? Or how to use it?

.empty just checks whether the range is empty, it returns true/false. You can't iterate over that. But yes, you can iterate over the ResultSet itself. Of course, ResultSet is random-access, so you can also index it like an array: "resultset[0]" returns the first row.
February 03, 2017
On Thursday, 2 February 2017 at 22:59:38 UTC, Nick Sabalausky wrote:
> On 02/02/2017 09:46 AM, Suliman wrote:
>> Could you explain real case if rangification of ResultSet
>>
>> http://semitwist.com/mysql-native-docs/v0.2.0-preview1/mysql/result/ResultSet.html
>>
>>
>> Does it's mean that I can write
>> foreach(x;result.empty) ? Or how to use it?
>
> .empty just checks whether the range is empty, it returns true/false. You can't iterate over that. But yes, you can iterate over the ResultSet itself. Of course, ResultSet is random-access, so you can also index it like an array: "resultset[0]" returns the first row.

But how by looking at docs I can understand what data can be iterable, and what do not?
February 06, 2017
https://github.com/Abscissa/mysql-native-experimental
Tag: v0.2.0-preview3

Just a few doc updates this time:

- Docs now include the `mysql.db.MysqlDB` to `mysql.pool.MySqlPool` change from preview2
- Clarified "Prepared" vs "PreparedImpl"
- Clarified "exec" vs "query"
- Rewrite the docs for ResultSet and ResultRange.

New docs:
http://semitwist.com/mysql-native-docs/v0.2.0-preview3

February 07, 2017
On Monday, 6 February 2017 at 20:32:24 UTC, Nick Sabalausky wrote:
> https://github.com/Abscissa/mysql-native-experimental
> Tag: v0.2.0-preview3
>
> Just a few doc updates this time:
>
> - Docs now include the `mysql.db.MysqlDB` to `mysql.pool.MySqlPool` change from preview2
> - Clarified "Prepared" vs "PreparedImpl"
> - Clarified "exec" vs "query"
> - Rewrite the docs for ResultSet and ResultRange.
>
> New docs:
> http://semitwist.com/mysql-native-docs/v0.2.0-preview3

Big thanks! I am very glad that driver becoming better!
I have question about DB connection pattern if you could give any advices I would be very glad http://stackoverflow.com/questions/42083976/database-connection-pattern
February 07, 2017
@Nick, could you explain how connection working if I am close it after opening and only then do request to DB. See comments on SO.
1 2 3 4
Next ›   Last »