Re: database 0.0.8 released
Add on allocator support and many more comments, aka if public facing then document it. Then we'd be in business!
Re: database 0.0.8 released
On Tuesday, 12 September 2017 at 17:14:27 UTC, Brian wrote: dlang database library: Database abstraction layer for D programing language, support PostgreSQL / MySQL / SQLite. Project: https://github.com/huntlabs/database Did you see DDBC project? It supports postgres, mysql, and sqlite, too. API is similar to Java JDBC.
Re: database 0.0.8 released
On Tuesday, 12 September 2017 at 17:14:27 UTC, Brian wrote: dlang database library: Database abstraction layer for D programing language, support PostgreSQL / MySQL / SQLite. not bad. - Statement Database.prepare(sql) Create a prepared Statement ooh, this is something I have been wanting to write for my database libs too...
database 0.0.8 released
dlang database library: Database abstraction layer for D programing language, support PostgreSQL / MySQL / SQLite. Project: https://github.com/huntlabs/database ## Database Database abstraction layer for D programing language, support PostgreSQL / MySQL / SQLite. ## Example ```D import std.stdio; import std.experimental.logger; import database; void main() { writeln("run database MySQL demo."); auto db = new Database("mysql://root:123456@localhost:3306/test?charset=utf-8"); int result = db.execute(`INSERT INTO user(username) VALUES("test")`); writeln(result); foreach(row; db.query("SELECT * FROM user LIMIT 10")) { writeln(row["username"]); } db.close(); } ``` ## Use DatabaseOption to instantiate a Database object ```D auto options = new DatabaseOption("mysql://root:123456@localhost:3306/test"); options.setMaximumConnection(5); auto db = new Database(options); db.execute("SET NAMES utf8"); ``` ## API - int Database.execute(string sql) Return number of execute result. ```D int result = db.execute('INSERT INTO user(username) VALUES("Brian")'); // if execute error ,db will throw an DatabaseException ``` - ResultSet Database.query(sql) Return ResultSet object for query(SELECT). ```D ResultSet rs = db.query("SELECT * FROM user LIMIT 10"); ``` - Statement Database.prepare(sql) Create a prepared Statement object. ```D Statement stmt = db.prepare("SELECT * FROM user where username = :username and age = :age LIMIT 10"); ``` - Statement.setParameter(param, value) : bind param's value to :param for sql. ```D stmt.setParameter("username", "viile"); stmt.setParameter("age", 18); ``` - ResultSet Statement.query() Return ResultSet ```D ResultSet rs = stmt.query(); foreach(row; rs) { writeln(row["username"]); } ``` - Row Statement.fetch() Return Row ```D Row row = stmt.fetch(); writeln(row["username"]); ``` - int Statement.execute() : return execute status for prepared Statement object. ```D int result = stmt.execute(); ``` - Statement.lastInsertId() : Statement.execute() for insert sql, return lastInsertId.
Re: D books for $10
On Tuesday, 12 September 2017 at 13:25:47 UTC, Ali wrote: On Tuesday, 12 September 2017 at 06:29:04 UTC, Kai Nacke wrote: Hi all, D Web Development by myself (https://www.packtpub.com/web-development/d-web-development) Regards, Kai kind of unrelated question, does vibe.d install and deploys to windows? I can confirm vibe.d is running fine on windows if you have a default dub package. As single dub file (app.d with dub instructions) doesn't work fine, because dlls copied to false directory. Kind regards André
Re: D on devdocs
On Monday, 11 September 2017 at 21:03:53 UTC, Andre Pany wrote: On Monday, 11 September 2017 at 03:23:47 UTC, ANtlord wrote: Hello. I'm not sure that you know, but documentation of D language has become to devdocs.io. It is web service provides offline documentation. We've got a useful tool for documentation viewing and reading. The next step is an implementation of version support. Don't compare anything to D. Use D. http://devdocs.io/d/ Great work! I noticed a small issue in the second example of http://devdocs.io/d/std_base64. Almost the whole code had the green (string) color. Maybe is there an issue with two strings seperated by a comma. Kind regards André Ok, I'll I fix it as soon as possible.
Re: D books for $10
On Tuesday, 12 September 2017 at 06:29:04 UTC, Kai Nacke wrote: Hi all, D Web Development by myself (https://www.packtpub.com/web-development/d-web-development) Regards, Kai kind of unrelated question, does vibe.d install and deploys to windows?
dlang-requetst v0.5.3 released
Hello, Since last announced version 0.5.1 several bugfixes and improvements were added: 1. Improvement: "bind" local address enabled on outgoing connections (https://github.com/ikod/dlang-requests/issues/51) 2. Improvement: SNI for ssl connection implemented, as some servers require SNI (https://github.com/ikod/dlang-requests/issues/55) 3. Bugfix: Segfault fetching some URLs (https://github.com/ikod/dlang-requests/issues/54) 4. Improvement: you do not need openssl at all if you do not use https (https://github.com/ikod/dlang-requests/issues/53) 5. Minor fixes for dmd v2.076.0 6. Docs on the wiki were cleaned up and made more actual. dlang-requests is HTTP/FTP client library, inspired by python-requests with goals: small memory footprint performance simple, high level API native D implementation
D books for $10
Hi all, Packt Publishing offers eBooks for $10 for a limited time. If your collection of D eBooks is still incomplete then this is a great chance for you. :-) Some of the eBook + Print bundles are reduced, too. Otherwise you can upgrade to print later at 50% off. D Cookbook by Adam D. Ruppe (https://www.packtpub.com/application-development/d-cookbook) Learning D by Michael Parker (https://www.packtpub.com/application-development/learning-d) D Web Development by myself (https://www.packtpub.com/web-development/d-web-development) Regards, Kai
Re: LDC 1.4.0
On Monday, 11 September 2017 at 23:32:55 UTC, kinke wrote: Hi everyone, on behalf of the LDC team, I'm glad to announce LDC 1.4.0. The highlights of version 1.4 in a nutshell: * Based on D 2.074.1. * Shipping with ldc-build-runtime, a small D tool to easily (cross-)compile the runtime libraries yourself. * Full Android support, incl. emulated TLS. * Improved support for AddressSanitizer and libFuzzer. The libraries are shipped with the prebuilt Linux x86_64 and OSX packages. * Prebuilt Linux x86_64 package shipping with LTO plugin, catching up with the OSX package. * Prebuilt packages include the NVPTX LLVM target, in order to target CUDA via DCompute. Full release log and downloads: https://github.com/ldc-developers/ldc/releases/tag/v1.4.0 Thanks to everybody contributing! Thanks for doing the development! Regards, Kai