Re: [ANN] PUnQLite NoSQL database project updated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PUnQLite NoSQL database project updated

Stephan Eggermont-3
What should be done to make this work on OS X?

UnQLiteFFI>>libraryFileNameForPlatform
has a wrong name, but that doesn't help me.
Even after renaming the library cannot be found.

Stephan







Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PUnQLite NoSQL database project updated

Pierce Ng-3
On Fri, Feb 13, 2015 at 06:07:07PM +0100, Stephan Eggermont wrote:
> What should be done to make this work on OS X?
> UnQLiteFFI>>libraryFileNameForPlatform
> has a wrong name, but that doesn't help me.
> Even after renaming the library cannot be found.

Smalltalk side, version 12/23/2013 by Masashi Umezawa:

  libraryFileNameForPlatform
    | platformClass |
    platformClass := NativeBoost forCurrentPlatform class.
    platformClass = NativeBoostMac32 ifTrue: [^'unqlite.dylib'].
    platformClass = NativeBoostWin32 ifTrue: [^'unqlite.dll'].
    platformClass = NativeBoostLinux32 ifTrue: [^'unqlite.so'].
    ^'unqlite'

OSX side, place the file unqlite.dylib in Pharo.app/Contents/MacOS/Plugins.

This worked for me in a Pharo 2.0 image and Jan 2014 VM.

Pierce

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PUnQLite NoSQL database project updated

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
Fails on Mavericks 10.9.4 in 40486 with 402 vm, 20619 with vm from 18-9-2013

open: dbHandle named: dbName mode: mode
        <primitive: #primitiveNativeCall module: #NativeBoostPlugin>
        ^ self nbCall: #( int unqlite_open( db_ptr* dbHandle, String dbName, uint mode) ) module: self libraryFileNameForPlatform

I did not compile myself, just used the lib-unqlite.dylib that is downloaded
by the configuration.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PUnQLite NoSQL database project updated

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
If I use the file from https://github.com/mumez/PunQLite/tree/master/binary/mac
at least the library is found. The db file is not created though resulting in a PqCursorError
in keys

db := PqDatabase open: 'test.db'.
db at: 'Smalltalk' put: 'COOL'.
db at: 'Pharo' put: 'HOT'.
db at: 'Smalltalk' ifPresent: [:data | data asString inspect ].
Transcript cr;
        show: db keys.



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PUnQLite NoSQL database project updated

sebastianconcept@gmail.co
I would really like to have a Pharo client for unQLite

I have places that would use it :)




> On Feb 14, 2015, at 6:30 AM, Stephan Eggermont <[hidden email]> wrote:
>
> If I use the file from https://github.com/mumez/PunQLite/tree/master/binary/mac
> at least the library is found. The db file is not created though resulting in a PqCursorError
> in keys
>
> db := PqDatabase open: 'test.db'.
> db at: 'Smalltalk' put: 'COOL'.
> db at: 'Pharo' put: 'HOT'.
> db at: 'Smalltalk' ifPresent: [:data | data asString inspect ].
> Transcript cr;
> show: db keys.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] PUnQLite NoSQL database project updated

Pierce Ng-3
In reply to this post by Stephan Eggermont-3
On Sat, Feb 14, 2015 at 09:30:12AM +0100, Stephan Eggermont wrote:
> db := PqDatabase open: 'test.db'.

Try using a FQPN. See this post about Pharo.app's default working directory
being "/" on OSX:

  http://forum.world.st/NBSQLite3-on-OS-X-Pharo-3-tc4800276.html#a4801485


Pierce