[Owncloud] Database access for apps.
Frank Karlitschek
karlitschek at kde.org
Sun Aug 28 17:27:17 UTC 2011
I agree with Jakob,
thats great work but we should put this into a branch first and discuss this further because it´s a quite significant change for ownCloud.
Cheers
Frank
On 27.08.2011, at 21:36, Jakob Sack wrote:
> Hello Côme,
>
> thank you for your work. To be honest I'd rather try to reuse something instead of starting everything from scratch. Furthermore I recommend to use a new branch for features like this.
> Regards,
>
> Jakob
>
>
> On Sat, 27 Aug 2011 18:32:16 +0200, Côme BERNIGAUD wrote:
>> I wrote a little something that can be used for a start.
>> It's pushed on the git, the file is "lib/db4app.php".
>> I also did the test_db app that shows how to use this lib.
>>
>> Please share any remarks about this.
>>
>> It can at least be a temporary solution in order to avoid SQL code in apps.
>>
>> PS: I got some trouble with serialize + OC_DB::escape function, I had
>> to add a base64_encode thing, it works but it takes some space.
>>
>> Le 26/08/2011 19:15, Frank Karlitschek a écrit :
>>> I agree.
>>> We should provide a clean API, including one for database access, for our Apps.
>>>
>>> Cheers
>>> Frank
>>>
>>> On 26.08.2011, at 18:56, Côme BERNIGAUD wrote:
>>>
>>>> I think owncloud should provide an API for accessing databases in the apps code.
>>>> Apps code should not contain any SQL code.
>>>> An app should be able to easily store and retrieve information linked to the current user.
>>>> "I, docsapp, want to save that the connected user have this object with this properties"
>>>>
>>>> Basically the app should be able to do something like objectid = OC_Database::store(userid,id) (the object would be serialized to be inserted in the database)
>>>> And then OC_Database::get_object(objectid) and OC_Database::get_objectsids(userid)
>>>> Maybe all these should takes as first parameter the name of the app. (so that it use a separate base/table for each app)
>>>>
>>>> This should preferably work both from PHP and Javascript.
>>>>
>>>> Côme.
>>>> _______________________________________________
>>>> Owncloud mailing list
>>>> Owncloud at kde.org
>>>> https://mail.kde.org/mailman/listinfo/owncloud
>>> Frank Karlitschek
>>> karlitschek at kde.org
>>>
>>>
>> _______________________________________________
>> Owncloud mailing list
>> Owncloud at kde.org
>> https://mail.kde.org/mailman/listinfo/owncloud
>
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud
Frank Karlitschek
karlitschek at kde.org
More information about the Owncloud
mailing list