aboutsummaryrefslogtreecommitdiffstats
path: root/mod/poco.php
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL support initial commitHabeas Codice2014-11-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were 11 main types of changes: - UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just copied from Friendica. All of these instances, the LIMIT 1 was simply removed. - Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice to boot). Proper explicit boolean conversions were added. New queries should use proper conventions. - MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_ func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There were no true toggles (XOR). New queries should refrain from using XOR when not necessary. - There are several fields which the schema has marked as NOT NULL, but the inserts don't specify them. The reason this works is because mysql totally ignores the constraint and adds an empty text default automatically. Again, non-compliant, obviously. In these cases a default of empty text was added. - Several statements rely on a non-standard MySQL feature (http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run a zillion times faster, even on MySQL. - A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG, UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_ - INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes around the value -- assist functions added in the dba_ - NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are handled in Zot/item packets automagically by quoting all dates with dbescdate(). - char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype for all text fields in the postgres schema. varchar was used in a couple of places where it actually seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code actually validates data, new bugs might come out from under the rug. - postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted. bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function was added to handle this transparently. - postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax. Statements were updated to be standard. These changes require corresponding changes in the coding standards. Please review those before adding any code going forward. Still on my TODO list: - remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting - Rewrite search queries for better results (both MySQL and Postgres)
* fix poco networkfriendica2014-09-041-1/+4
|
* put bookmarked chatrooms into pocofriendica2014-02-251-0/+11
|
* add rating support to pocofriendica2013-02-151-4/+8
|
* mark for death implementedfriendica2013-01-291-1/+1
|
* delete item should now mostly workfriendica2013-01-281-1/+1
|
* Someday the social graph will work, but alas not today. Add more debugging.friendica2013-01-281-6/+14
|
* suppose I should do this right.friendica2013-01-271-1/+1
|
* still no social graph - oh maybe it's because the observer hash isn't valid ↵friendica2013-01-271-1/+1
| | | | and everybody's permission is denied. Well it's just another bug, but not the real bug. We're connecting as anonymous so that shouldn't make a difference.
* some poco fixesfriendica2013-01-221-2/+1
|
* fix poco acct: urlfriendica2012-12-301-2/+2
|
* make poco work againfriendica2012-11-291-23/+42
|
* more heavy liftingfriendica2012-10-231-10/+13
|
* start on contacts/profilesfriendica2012-08-301-3/+3
|
* Merge branch 'master' of https://github.com/friendica/friendicaAlexander Kampmann2012-04-051-0/+2
|\ | | | | | | | | | | Conflicts: include/config.php update.php
| * make 'PHP "register_argc_argv"' easier to translate, may require fix for po2phpfriendica2012-04-051-0/+2
|/
* add remove_user hook (it looks like dreamhost changed all my file ↵friendica2012-01-181-0/+0
| | | | permissions, this will make a nasty commit)
* typofriendica2011-12-181-0/+1
|
* typofriendica2011-12-181-1/+1
|
* add webfinger to poco, if presentfriendica2011-12-181-1/+3
|
* data structures to support hidden friendsfriendica2011-12-051-2/+2
|
* poco addition to provide a "suggestme" for new membersfriendica2011-11-281-19/+47
|
* name change continued, social graph tools and stuctures, fix for spanish ↵Friendika2011-10-311-2/+2
| | | | province name
* poco should now be spec compliantFriendika2011-10-271-2/+2
|
* hmmm - why won't poco xml workFriendika2011-10-271-8/+6
|
* more poco spec complianceFriendika2011-10-271-19/+66
|
* basic portable contacts http://portablecontacts.net/draft-spec.html no ↵Friendika2011-10-261-0/+84
filter/sort, or xml at the moment