pylaligand / dart-sqlite Goto Github PK
View Code? Open in Web Editor NEWSQLite bindings for the Dart VM
License: Apache License 2.0
SQLite bindings for the Dart VM
License: Apache License 2.0
This will be easier to use than the current sh script.
Will be useful to create release binaries for Linux too.
Any Chance you could do this for WIndows?
Since it's exported it does not need to be in the lib folder.
This might help with the 403 errors when using the GitHub API.
This is blocked by https://github.com/pylaligand/dart-sqlite/blob/master/lib/src/native.dart#L9 working properly.
Hi,
Just wondering if there are any plans on updating this package to support Dart version 2?
We are developing a Flutter app and are making use of the sqflite package, however testing is complicated by the device OS dependency e.g. only supports on Android or iOS.
Ideally we'd like to be able to utilise this package to construct a specialised Sqlite DB interface for non-device environments but benefit from the common underlying SQL syntax and record changes. Use of Mockito not sufficient.
Hope the above makes sense as to use-case.
thx
Creating releases is a first step. Next step is to provide some kind of script to download and install all the various artifacts. Bonus point for documentation.
Other SQL libraries have them and they're pretty useful.
I have an error on noSuchMethod() :
"cannot override method noSuchMethod(InvocationMirror) from Object, wrong number of required parameters"
...which can easily be run from a fork.
My pubspec.yaml
looks like this:
name: sqlite_test
version: 0.0.1
description: A simple console application.
dependencies:
sqlite: ^0.3.0
My main.dart
looks like this:
import 'package:sqlite/sqlite.dart';
main(List<String> args) async {
final db = new Database.inMemory();
Row row =
await db.query('SELECT ?+16, UPPER(?)', params: [2000, 'Ligue 1']).first;
final int year = row[0];
final String league = row[1];
print('-- $league $year --');
}
And yet, running it fails like this:
$ pub run bin/main.dart
Unhandled exception:
Class 'Database' has no instance method 'query'.
NoSuchMethodError: method not found: 'query'
Receiver: Instance of 'Database'
Arguments: ["SELECT ?+16, UPPER(?)", params: Instance(length:2) of '_GrowableList']
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 main.<main_async_body> (file:///Users/brett/dart-projects/sqlite-test/bin/main.dart:7:16)
#3 Future.Future.microtask.<anonymous closure> (dart:async/future.dart:144)
#4 _microtaskLoop (dart:async/schedule_microtask.dart:41)
#5 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#6 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#7 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)
Halp?
The code can't compile on latest Dart SDK. Could you please fix it? I need it very much but I can't do it.
it show me:
root@well:/home/well/myflutter/customers# flutter run
Running 'flutter packages get' in customers... 12679ms
Error detected in application source code:
error: Unable to read Dart source 'package:sqlite/src/dart-ext:dart_sqlite'.
then ,i have no idea.
g++ -O2 -DDART_SHARED_LIB -I/home/biggenius/dart-sdk/include -rdynamic -fPIC -shared src/dart_sqlite.cc -lsqlite3 -o lib/libdart_sqlite.so
src/dart_sqlite.cc: In function ‘Dart_Handle* dart_sqlite_Init(Dart_Handle)’:
src/dart_sqlite.cc:34:79: error: invalid conversion from ‘void (* ()(Dart_Handle, int))(Dart_NativeArguments) {aka void (_ ()(Dart_Handle, int))(Dart_NativeArguments)}’ to ‘Dart_NativeEntryResolver {aka void ( ()(Dart_Handle, int, bool))(Dart_NativeArguments)}’ [-fpermissive]
In file included from src/dart_sqlite.cc:8:0:
src/dart_api.h:2244:25: error: initializing argument 2 of ‘Dart_Handle* Dart_SetNativeResolver(Dart_Handle, Dart_NativeEntryResolver)’ [-fpermissive]
src/dart_sqlite.cc: In function ‘void PrepareStatement(Dart_NativeArguments)’:
src/dart_sqlite.cc:129:107: error: invalid conversion from ‘void ()(Dart_Handle, void_) {aka void ()(Dart_Handle, void)}’ to ‘intptr_t {aka long int}’ [-fpermissive]
src/dart_sqlite.cc:129:107: error: too few arguments to function ‘Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle(Dart_Handle, void*, intptr_t, Dart_WeakPersistentHandleFinalizer)’
In file included from src/dart_sqlite.cc:8:0:
src/dart_api.h:466:39: note: declared here
Linux 3.8.0-34-generic Ubuntu x86_64 x86_64 x86_64 GNU/Linux
Dart VM version: 1.3.0-dev.6.1 (Sat Mar 22 02:14:22 2014) on "linux_x64"
It would be wonderfull if you could provide support for sqlite on windows too
Tried to run a script that imports package:sqlite/sqlite.dart
inside google's latest docker dart image google/dart
and it simply won't run with the following error:
libdart_sqlite.so: cannot open shared object file: No such file or directory
When doing the same steps outside of container on OS X, it all worked no problems.
See output of pub publish --dry-run
. More details at https://www.dartlang.org/tools/pub/publishing.html.
im on
ubuntu 16.04
dart sdk 1.19
sqlite 0.4.0
but then I always get an error saying
...
Warning: sqlite.Database.close(): 2 statements still open.
finished with exit code 139 (interrupted by signal 11: SIGSEGV)
...
any tips on what Im doing wrong?
Unhandled exception:
SqliteException: Dart buffer was too small
#0 bindValues (package:sqlite/src/native.dart:36:71)
#1 Request.query (package:sqlite/src/request.dart:106:7)
#2 Request.execute (package:sqlite/src/request.dart:115:12)
#3 Database.execute (package:sqlite/sqlite.dart:70:50)
coveralls.io
Nobody is maintaining it.
Dart doesn't use the #import
syntax anymore.
Blocked on Dart 1.16.0.
Blocked on Dart 1.16.0.
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.