cruisercoder / dstddb Goto Github PK
View Code? Open in Web Editor NEWA proposed standard database interface and library for D
License: MIT License
A proposed standard database interface and library for D
License: MIT License
If to try to create sqllite on not exist path like:
try{ createDatabase("file:///C://code1//sqlLiteDBFullName.db").query("CREATE TABLE IF NOT EXISTS ddbct1 (ts text)"); } catch(Exception e) { writeln(e.msg); }
We will get error:
sqlite opening file: C://code1//sqlLiteDBFullName.db error: rc: 1461C78D29 2016-04-06T13:36:33.888:C:\Users\bubenkov_di\AppData\Roaming\dub\packages\dstddb -0.0.3\dstddb\src\std\database\sqlite\database.d:throw_error:429 prepare:unable to open database file sqlite error: prepare:
It's better to throw more human friendly exception.
How to specify login and pass for connection to DB?
createDatabase("file:///C://code//sqlLiteDBFullName.db").query("CREATE TABLE IF NOT EXISTS ddbct1 (ts text)");
Running .\dbsync.exe sqlite opening file: C://code//sqlLiteDBFullName.db 2016-04-06T13:32:04.449:C:\Users\bubenkov_di\AppData\Roaming\dub\packages\dstddb -0.0.3\dstddb\src\std\database\sqlite\database.d:query:268 sqlite3_step: status: 101
And no result on C://code// folder.
Also why do I need to write 3 slashes? like: file:///
?
Hi,
Clone the project and I try to run dub build but I get this error.
src/std/database/resolver.d(8,8): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD
auto db = createDatabase("file:///" ~ sqlLiteDBName).query("CREATE TABLE IF NOT EXISTS MySyncData (guid text, id integer, name text, fl integer)"); auto con = db.connection();
Output:
source\app.d(104,28): Error: template std.database.sqlite.database.connection cannot deduce function from argument types !()(Result!(DefaultPolicy)), candidate are: \packages\dstddb-0.0.3\dstddb\src\std\dtabase\sqlite\database.d(31,6): std.database.sqlite.database.connection()(Database!T db, string source = "") dmd failed with exit code 1.
import std.database;
main(){
auto db = Database.create("MYDB");
db.execute("insert into table('name',123)");
}
no property 'execute' for type 'Database'
It makes me wonder if i had it setup right...
It'd be quite helpful to get FreeTDS bindings, to facilitate connectivity to MS SQL Server and Sybase ASE databases.
import std.database.sqlite;
import std.database;
....
auto db = createDatabase("file:///" ~ sqlLiteDBName).query("CREATE TABLE IF NOT EXISTS MySyncData (guid text, id integer, name text, fl integer)");
db.query(insert into MySyncData values("sometext",14)
);
error:
source\app.d(103,6): Error: no property 'query' for type 'Result!(DefaultPolicy)
Do you plan implement support of all DBs from scratch or dstddb would include same wrappers?
I mean that there is for example perfect native driver for PG https://github.com/etcimon/ddb
Is it's possible to use code from it, to do not write already existent code again.
Please add basic support of this DB!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.