Difference between revisions of "WikiDB"

From TestWiki
Jump to: navigation, search
m (News: not so big an issue as it seemed...)
(News: Update)
Line 10: Line 10:
 
== News ==
 
== News ==
  
* '''v3 is currently in beta-testing'''This is the first update to WikiDB for about a year and a half, partly due to a very busy life, and partly due to this being quite a major reworking of some of the core internals.  This new version will include the following new features:
+
=== Version 3 is now available ===
 +
* '''[[:Image:WikiDB.zip|Click here to download (zip file)]]'''
 +
* '''[[/Installation/|Installation instructions]]'''
 +
 
 +
This is the first update to WikiDB for about a year and a half, partly due to a very busy life, and partly due to this being quite a major reworking of some of the core internals.  This new version includes the following new features:
 +
 
 
** Proper alias resolution (you can now rename tables and watch as the data magically follows the redirect).
 
** Proper alias resolution (you can now rename tables and watch as the data magically follows the redirect).
 
** An extension of the <data> tag which allows you to define multiple data rows within a single tag.
 
** An extension of the <data> tag which allows you to define multiple data rows within a single tag.
Line 20: Line 25:
 
** A whole load of other little bug fixes, and a general code cleanup.
 
** A whole load of other little bug fixes, and a general code cleanup.
 
** No doubt some other little bits I've forgotten.
 
** No doubt some other little bits I've forgotten.
:--[[User:HappyDog|HappyDog]] 18:45, 9 August 2010 (BST)
 
  
* I am holding a consultation about the syntax of the repeat tag, as the more I think about it the more I realise that there is probably not a 'perfect' solution, but instead a 'best compromise' between simplicity, brevity, flexibility and readability.  Anyone who would like to input on this should do so on the [[/Repeat tag syntax/]] page. --[[User:HappyDog|HappyDog]] 23:50, 9 December 2008 (GMT)
+
The documentation on this wiki has not yet been updated (apart from the [[/Installation/|installation instructions]]), but I am working on it... In the meantime, you're advised to check the last edit date of any information, before treating it as gospel! :-)
 +
 
 +
-- 00:30, 12 September 2010 (BST)
 +
 
 +
=== <repeat> syntax ===
 +
 
 +
I am holding a consultation about the syntax of the repeat tag, as the more I think about it the more I realise that there is probably not a 'perfect' solution, but instead a 'best compromise' between simplicity, brevity, flexibility and readability.  Anyone who would like to input on this should do so on the [[/Repeat tag syntax/]] page. --[[User:HappyDog|HappyDog]] 23:50, 9 December 2008 (GMT)
  
 
== Documentation ==
 
== Documentation ==

Revision as of 23:30, 11 September 2010

WikiDB icon.png

This extension implements a wiki-style database within your wiki. You can define tables, enter data and run queries using wiki markup, and all of these things are independent of each other.

Three things to bear in mind before going any further:

  1. This is in an early stage of development. Core functionality is in place, but many planned features are currently lacking.
  2. The syntax is currently fairly long-winded for certain tasks. This will be streamlined (suggestions welcome) but it is sufficient for proof-of-concept.
  3. There has been very little optimisation, and there is a lot of potential for it. I welcome advice on this matter, but do not be put off by speed/efficiency of the current version.

News

Version 3 is now available

This is the first update to WikiDB for about a year and a half, partly due to a very busy life, and partly due to this being quite a major reworking of some of the core internals. This new version includes the following new features:

    • Proper alias resolution (you can now rename tables and watch as the data magically follows the redirect).
    • An extension of the <data> tag which allows you to define multiple data rows within a single tag.
    • Fixes to the sorting/filtering algorithm so that the <repeat> tag now works a lot better (and hopefully a lot faster!).
    • Updated the way parsing works when saving a page. It is now a lot less hacky and less likely to break if the MW parser object is updated. It also now ensures the article is parsed consistently in all cases (previously it was done differently when saving to when viewing the page, which in some rare cases could result in a mismatch between the data you see and what is actually in the DB).
    • A number of display bugs are now fixed, particularly in relation to the way the SourceArticle field was output.
    • Much less chance of SQL injection.
    • We now have maintenance scripts! No more copy/paste SQL! No more null edits to fix parsing issues!
    • A whole load of other little bug fixes, and a general code cleanup.
    • No doubt some other little bits I've forgotten.

The documentation on this wiki has not yet been updated (apart from the installation instructions), but I am working on it... In the meantime, you're advised to check the last edit date of any information, before treating it as gospel! :-)

-- 00:30, 12 September 2010 (BST)

<repeat> syntax

I am holding a consultation about the syntax of the repeat tag, as the more I think about it the more I realise that there is probably not a 'perfect' solution, but instead a 'best compromise' between simplicity, brevity, flexibility and readability. Anyone who would like to input on this should do so on the Repeat tag syntax page. --HappyDog 23:50, 9 December 2008 (GMT)

Documentation

MediaWiki logo.png
This extension is also documented at
Extension:WikiDB
on MediaWiki.org.

If the pages are not in sync. then this version on my test wiki is always the most up-to-date.

  • Tutorial - read this first!
  • Features - A list of the extension's current and planned functionality.
  • Data types - A list of currently supported data types.
  • Installation - What you need to do to get the extension working.
  • Syntax - Current syntax for all elements of the extension.
  • ToDo List - My list of planned features, and general (non-bug) issues that need fixing.
  • Bugs - Please report any bugs here.
  • Feature requests - Add any suggestions for new features to this page.
  • License - CC-BY-SA 2.5


Requirements

Currently this extension probably just requires MW 1.4.0 and above, but that is very much untested. In practice I was developing on 1.5.8 initially, and now on 1.6.10 - so it probably works fine on 1.5.x and 1.6.x (though this may change). It should also be fine on later versions of MW, but this has not been tested by me.

If you are a user of the extension, it would be very useful if you could add yourself to the Compatibility page so I can get an idea of where problems may lie, and what also which older versions I might need to support if I decide to upgrade the minimum requirements.

Versions

The version-numbering system I have adopted is based on two numbers:

  • The version number is incremented whenever incompatible changes are made. If you are using WikiDB and wish to upgrade to a new version with a higher version number, check out the list of changes first, or things may break! The version number can be seen on Special:Version or at the top of the main WikiDB.php file.
  • The revision number is incremented every time I make any changes at all to the code, or to other unrelated code that sits in the same repository. The revision number for each file can be seen at the top of the file, and the revision number for the extension is the highest of these numbers. This is displayed at Special:Version. It is always safe to upgrade to a later revision, as long as the version number has not changed, and you ensure that all files are updated.

In both cases, the only significance of the numbers are that higher numbers are newer. I don't believe in sitting on a 0.x release branch for the rest of my life, so the first version I released is v1, and this will be updated as necessary according to the above rule.

If your version of the code doesn't have a version number, it is v1. If it doesn't have a revision either, it is very old and should definitely be updated!

Technical Info

  • Tables - Details about the new tables that are required by the extension.
  • Files - Listings of all the files required by the extension.