Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Documentation/Reference for BlackBerry Core NDK for sqlite integration.

i've searched anywhere on BlackBerry Core NDK pages and have not found anything about sqlite integration with core application except link to original sqlite page.

is it really there's no documentation for sqlite at all? or am i missed it?

same questions also with some other open source component like libxml2, couchDB, json_parser, etc?

Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Re: Documentation/Reference for BlackBerry Core NDK for sqlite integration.

there's no one here have information about this?


too bad...


looks like i have to ported stock sqlite lib myself instead of using undocumented dev files provided by BB NDK

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Documentation/Reference for BlackBerry Core NDK for sqlite integration.

Hi,

 

I haven't used sqlite on BB10 yet, but I think this should work:

 

Add

LIBS += -lsqlite3

to .pro file

 

Add

#include <sqlite3.h>

to .cpp

 

API description can be taken directly from sqlite website.

 

Other libs are pretty much the same.

 

1) Find the relevant files:

 

cd /Applications/Momentics.app/

find . -iname "*sqlite*"

...

./target_10_2_0_339/qnx6/usr/include/sqlite3.h

./target_10_2_0_339/qnx6/armle-v7/usr/lib/libsqlite3.so

...

2) Link with .so file:

LIBS += -lsqlite3    // 'lib' will be prepended automatically

3) Include the ".h" file.

 


 

For libxml2:

 

find . -iname "*libxml*"

./target_10_2_0_339/qnx6/usr/include/libxml

./target_10_2_0_339/qnx6/armle-v7/usr/lib/libxml2.so

Add

LIBS += -lxml2

to .pro file

 

ls -l ./target_10_2_0_339/qnx6/usr/include/libxml

To get the list of libxml headers.

 

#include <libxml/...filename.h...>

And so on.

 

 


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Re: Documentation/Reference for BlackBerry Core NDK for sqlite integration.

[ Edited ]

thanks for replying Zmey.
i know all about where to find a header & library file, also to how to compile & link programs againts those libs.

problem is, no documentation, no reference, nothing, but they are listed in the API Reference:
https://developer.blackberry.com/native/reference/core/

i'm have no intention to blame documentation team for this, i understand that documentation is huge tasks, and since the development of OS10 is so rapidly, it makes the tasks to keep documentation updated more harder.

i just want to let them know that this should be done, if not, please put a notes that this library is supported but not yet documented, please refer to original documentation, something like that.

on the other hand, i don't want to rely my application on any API that has no documentation. i don't know how BlackBerry implement the original/stock sqlite3 or make what modification to it, so i'd better build it myself from stock sqlite3 and read documentation there, and try my best to adopt it to BB NDK enviroment.

i've done it with libssh2 which is as far as i know is not supported, if you are interested, you may see my notes on the process in my blog:

http://gpl4all.crysta-corp.com/build-libssh2-so-native-bb-os10

anyway thank you for spare your time answering my question.

additional note: i'm only do ANSI c, no c++/Qt/Cascade, it's more easy to me to compile and link without depedency on GUI IDE.

 

Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Re: Documentation/Reference for BlackBerry Core NDK for sqlite integration.

[ Edited ]

and actually it's not so hard to porting some open source application/library to QNX based BlackBerry OS10, and i'm half way through building sqlite3 from scratch, crossed compile in Debian/Linux:

here is my (unfinished) notes:

 

http://gpl4all.crysta-corp.com/sqlite3-blackberry-os10/

 

notes:

by doing this, it's clear to me that sqlite2 included in BB NDK 10.2 is at some point modified, because it's depend on readline and no readline in BB NDK 10.2.

Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Documentation/Reference for BlackBerry Core NDK for sqlite integration.

The idea for the native libraries like that is that they are there because you already know how to use them. It's just a third party open source library that we've already ported and included in the platform. You can also port any library you like yourself. If you're a cross platform game using sqlite, you know we have it on our platform.

 

We expect most new BlackBerry 10 specific apps to be built in Cascades using the Qt framework (or Webworks). The database access methods there are quite well documented.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Re: Documentation/Reference for BlackBerry Core NDK for sqlite integration.

i'm not developing games application, and i'm not using Cascades nor Qt also

my application is written in C

i know how to use sqlite3 in Linux, because all documentation, reference, man page, etc are avail.

but when i need to create BB10 application that uses sqlite3, i need to know whether there is/are modification(s) from stock sqlite3.

as comparison, openssl is also open source, available to be linked, and the documentation for openssl is available in Core Reference:
https://developer.blackberry.com/native/reference/core/com.qnx.doc.sbengine.lib_ref/topic/manual/c_s...

while sqlite3 reference can not be found anywhere altough headers and libs are included in Native Core SDK and listed here:
https://developer.blackberry.com/native/documentation/core/data_management.htmlhttps://developer.bla...

in that page, sqlite listed links to sqlite website, same with libxml2 and expat, no documentation at all, and on the other hand, i can check sources of JSON_parser & CouchDB that are listed and pointed to their repo in github.com/blackberry

my point is: if the open source component is listed, it shoud be a documentation or notes, or even the repo in github.com so developers who needs it able to check themself for any modification done to those open source components.