sqlite 3.3.7

Wir haben aktuell ein Problem mit dem Board und arbeiten an der Lösung...
  • Hier sqlite in der version 3.3.7 fuer die 7025.


    libsqlite wird auf jeden Fall benoetigt. readline und sqlite werden fuer sh scripting benutzt und (wer sagt's) python Modul fuer Python.


    Hier ist ein Link fuer die Python Sqlite Dokumentation und fuer eine Beschreibung des Python SQL API 2.0.


    Wenn ihr mehr Information zu sqlite habt ist google stets eure Freund;)

  • Habe etwas Zeit uebrig gehabt und habe mir ein Schema fuer Databasedefintion im python zusammen gestellt. Bitte schaut ihr's mal an und gibt Bescheid ob etwas schief lauft. Dieses sollte auch auf'm enigma2 Box arbeiten koennen;)



    Mit dem selbst geschriebene python package wird aus sowas[php]<?xml version="1.0" encoding="utf-8"?>
    <!-- vim: encoding=utf-8: tabstop=3 -->
    <database name="myminicity" version="1.0">
    This is a database comment.
    <table name="ranking" version="1.1">
    The 'ranking' table lists participants according to population and income.
    <column sequence="1" name="host" type="varchar" precision="63" nullable="false" collate="nocase">
    The 'host' column contains the hostname of the host and not the FQDN.
    </column>
    <column sequence="2" name="name" type="varchar" precision="255" nullable="false" />
    <column sequence="3" name="population" type="int" nullable="false" />
    <column sequence="4" name="incomes" type="int" nullable="false" />
    <primarykey>
    This is a primary key comment.
    <key_column sequence="1" name="host" />
    </primarykey>
    </table>
    </database>[/php]folgendes[php]create table ranking (
    host varchar(63) not null collate nocase
    , name varchar(255) not null
    , population integer not null
    , incomes integer not null
    , primary key (host)
    )[/php]


    Um sie zu testen packt den Anhang aus und wechsel zu dem pydb Verzeichnis. Danach koennt ihr mit folgenden Befehle die Sache tanzen lassen[php]john@new-york:~/enigma2/sandbox/myminicity/pydb$ python
    Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
    [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import database.parser.XmlDatabase, xml.dom.minidom, database.sqlite3.Table
    >>> dom = xml.dom.minidom.parseString("".join(open("myminicity.xml").readlines()))
    >>> d = database.parser.XmlDatabase.XmlDatabase(dom.getElementsByTagName("database")[0])()
    >>> for t in d.tables:
    ... print database.sqlite3.Table.CreateTable(t)
    ...
    create table ranking (
    host varchar(63) not null collate nocase
    , name varchar(255) not null
    , population integer not null
    , incomes integer not null
    , primary key (host)
    )
    create table city (
    host varchar(63) not null collate nocase
    , name varchar(255) not null
    , region varchar(31) not null
    , region_code char(2) not null
    , ranking integer not null
    , population integer not null
    , incomes integer not null
    , unemployment integer not null
    , transport integer not null
    , criminality integer not null
    , pollution integer not null
    , nextnuke integer not null
    , signatures integer not null
    , com integer not null
    , env integer not null
    , ind integer not null
    , sec integer not null
    , tra integer not null
    , primary key (host)
    )
    >>> [/php]