sql
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
[quote="fergy"but please put Your patch in this[/quote]
I do not have CVS write access.
The code you showed goes to cdk/make/database.mk (a new file),
just check my patch file, everything is in there.
I do not have CVS write access.
The code you showed goes to cdk/make/database.mk (a new file),
just check my patch file, everything is in there.
-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
Umm, ok, but what is with this than?
....
Code: Alles auswählen
+if WITH_SQLITE
+ $(INSTALL) $(targetprefix)/bin/sqlite3 $(flashprefix)/root/bin
+endif
Code: Alles auswählen
+if ENABLE_SQLITE
+ $(INSTALL) $(targetprefix)/bin/sqlite3 $(flashprefix)/root/bin
+endif
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
I replaced it with this code:fergy hat geschrieben:Umm, ok, but what is with this than?
Code: Alles auswählen
if TARGETRULESET_FLASH
flash-sqlite: $(flashprefix)/root/bin/sqlite3
$(flashprefix)/root/bin/sqlite3: @DEPENDS_sqlite@ | $(flashprefix)/root
@PREPARE_sqlite@
[...]
-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
Erm, commited to HEAD.rhabarber1848 hat geschrieben:I replaced it with this code:fergy hat geschrieben:Umm, ok, but what is with this than?Code: Alles auswählen
if TARGETRULESET_FLASH flash-sqlite: $(flashprefix)/root/bin/sqlite3 $(flashprefix)/root/bin/sqlite3: @DEPENDS_sqlite@ | $(flashprefix)/root @PREPARE_sqlite@ [...]

PS, I am working on Enigma epg-sql atm.... well, no much sources outside as one team don't wanna publish patch, but due to a *N*I*T*R*O* source, I try to handle that.
C Ya, Ramon
Cheers
-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
As I see in *N*I*T*R*O* sources, @chopper was use it for epg and enigma settings storage.Tommy hat geschrieben:is this sql construction maybe useful / faster as to work with and parse XML? Could it make sense to use it for (instead of) satelites and bouquets XML too?
I don't see reason why it cannot be used for anything else?! It's simply sql, so as We use it in Linux distributions, We can use it in Enigma ( maybe Neutrino.... @seife?! ) for storage of anything!
If.... ( I will name it with marks ) *P*L*i* can use it for EPG.... and don't wanna publish patch, so We must to handle patch by ourself...

Shall We...... ?!

-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
Tommy hat geschrieben:is this sql construction maybe useful / faster as to work with and parse XML? Could it make sense to use it for (instead of) satelites and bouquets XML too?
Erm, yup, satellites storage? No problem.... :
Code: Alles auswählen
CREATE TABLE orbitalSats (
satID INT PRIMARY KEY,
satName TEXT,
satFlags INT,
satPos INT
);
CREATE UNIQUE INDEX idx_id ON orbitalSats(satID);
/* Put satellite inserts here from satellites.xml */
INSERT INTO orbitalSats (satID,satName,satFlags,satPos) VALUES (01,"119.0 W EchoStar 7",1,-1190);
INSERT INTO orbitalSats (satID,satName,satFlags,satPos) VALUES (02,"110.0 W EchoStar 6",1,-1100);
INSERT INTO orbitalSats (satID,satName,satFlags,satPos) VALUES (03,"105.0 W AMC 2",1,-1050);
INSERT INTO orbitalSats (satID,satName,satFlags,satPos) VALUES (04,"97.0 W Telstar 5",1,-970);
INSERT INTO orbitalSats (satID,satName,satFlags,satPos) VALUES (05,"91.0 W Nimiq 1",1,-910);
INSERT INTO orbitalSats (satID,satName,satFlags,satPos) VALUES (06,"82.0 W Nimiq 2",1,-820);
INSERT INTO orbitalSats (satID,satName,satFlags,satPos) VALUES (07,"61.5 W EchoStar 3",1,-615);
CREATE TABLE transponders (
ID INT,
satID INT,
frequency INT,
symbol_rate INT,
polarization INT,
fec int,
);
CREATE UNIQUE INDEX idx_id on transponders(ID,satID);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (100,01,12224000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (101,01,12239000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (102,01,12253000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (103,01,12268000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (104,01,12282000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (105,01,12297000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (106,01,12311000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (107,01,12326000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (108,01,12341000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (109,01,12355000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (110,01,12370000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (111,01,12384000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (112,01,12399000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (113,01,12414000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (114,01,12428000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (115,01,12443000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (116,01,12457000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (117,01,12472000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (118,01,12486000,20000000,1,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (119,01,12501000,20000000,0,0);
INSERT INTO transponders (ID,satID,frequency,symbol_rate,polarization,fec) VALUES (120,01,12516000,20000000,1,0);
Code: Alles auswählen
/* Enigma Configuration Table */
CREATE TABLE EnigmaConfig (
id INT,
key TEXT,
value TEXT
);
CREATE UNIQUE INDEX idx_key ON EnigmaConfig(key);
INSERT INTO "EnigmaConfig" VALUES(1, '/ezap/osd/simpleMainMenu', '0');
INSERT INTO "EnigmaConfig" VALUES(1, '/ezap/osd/alpha', '255');
INSERT INTO "EnigmaConfig" VALUES(1, '/ezap/osd/gamma', '128');
INSERT INTO "EnigmaConfig" VALUES(1, '/ezap/osd/brightness', '128');
INSERT INTO "EnigmaConfig" VALUES(1, '/ezap/lcd/brightness', '130');
INSERT INTO "EnigmaConfig" VALUES(1, '/ezap/lcd/contrast', '32');
INSERT INTO "EnigmaConfig" VALUES(1, '/ezap/lcd/inverted', '0');
INSERT INTO "EnigmaConfig" VALUES(1, '/elitedvb/video/tvsystem', '2');
INSERT INTO "EnigmaConfig" VALUES(1, '/elitedvb/language', 'C');
INSERT INTO "EnigmaConfig" VALUES(1, '/elitedvb/extra/autobouquetchange', '1');
INSERT INTO "EnigmaConfig" VALUES(1, '/elitedvb/extra/hideerror', '1');
INSERT INTO "EnigmaConfig" VALUES(1, '/elitedvb/extra/clockdisplay', '1');
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
Do you have Dbox2 hardware also in mind when thinking about SQL?fergy hat geschrieben:I don't see reason why it cannot be used for anything else?!
How does SQL perform on the 8MB flash of the Dbox2 or does it
need an external storage, like HDD or NFS?
Please make all your SQL code optional in a sense that all current
code will still function like it does now.
-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
No, I don't have Dbox2rhabarber1848 hat geschrieben:Do you have Dbox2 hardware also in mind when thinking about SQL?fergy hat geschrieben:I don't see reason why it cannot be used for anything else?!
How does SQL perform on the 8MB flash of the Dbox2 or does it
need an external storage, like HDD or NFS?
Please make all your SQL code optional in a sense that all current
code will still function like it does now.

Well, how do You thing that chopper was handle that before three years? By trick? Nah, contra question, how was sql perform on old Dreambox'es?rhabarber1848 hat geschrieben:How does SQL perform on the 8MB flash
If I have 8mb on place, how do You think that I thinking?! To improve something maybe, and that that work on small storage?!
Forget, as sql storage was long time ago builded for db, but noone was have interest to handle it, so I talk with Myself ( as You was talk with Yourself

sql need external storage ( from My reading ) only for epg icons.... well, not big deal, but that is just My opinion.
Yes, I have as db7000 have also shit of memory as dbox2, so, as I have atm only 7000'er and other two boxes, but 7000 is main machine for everything, I have in mind 8mb problem.rhabarber1848 hat geschrieben:Do you have Dbox2 hardware also in mind when thinking about SQL?
In other way, if someone was handle this few years ago, I will put question to all: why was everybody move this question on side through 3 years?
sql is pretty smarter way to handle settings, epg-storage, ... lot's of things, ... anyway, I will remove that option if You don't like it.
In contra question, do You have Dreambox?
-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
???Coronas hat geschrieben:+1rhabarber1848 hat geschrieben:Please make all your SQL code optional in a sense that all current
code will still function like it does now.
How will I do that, except to remove it from cvs?
"Optional" is -
Code: Alles auswählen
-enable-sqlite
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
I don et know, I own a Dbox2 for about a year now and started coding for Tuxboxfergy hat geschrieben:how do You thing that chopper was handle that before three years?
last autumn, so I am hearing about chopper for the first time.
Fine.fergy hat geschrieben:I have in mind 8mb problem.
I don et know but if you think your SQL code will work fine even on afergy hat geschrieben:why was everybody move this question on side through 3 years?
Dbox2 with its slow CPU then it should not be of any interest to us
what happened years ago.
I never said I dislike SQL stuff in the Tuxbox project, the opposite is true.fergy hat geschrieben:anyway, I will remove that option if You don't like it.
I just wanted to emphasize that the optional character of your SQL code
is important to me because personally I do not need it. I do not own a
satellite dish, instead I am hooked up to the local cable provider, so my
station list, EPG and so on are not that big

No.fergy hat geschrieben:do You have Dreambox?
Everything is fine with that, the old code stays and the new functionsfergy hat geschrieben:How will I do that, except to remove it from cvs?
"Optional" is -!!! What ever more is optional here?Code: Alles auswählen
-enable-sqlite
are activated only with --enable-sqlite, thats perfect!
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
Urgent update for sqlite patch, to be committed to CVS asap.
You broke cdk/Makefile because of bad tab chars used in cdk/make/,
also you forgot a small patch in cdk/make/reduce-libs.mk.
This diff fixes all of this: sqlite.diff
You broke cdk/Makefile because of bad tab chars used in cdk/make/,
also you forgot a small patch in cdk/make/reduce-libs.mk.
This diff fixes all of this: sqlite.diff
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
Code: Alles auswählen
if ENABLE_SQLITE
-lsqlite3
endif
to missing backspace, which can not be added here either.
It might even render apps/tuxbox/enigma/src/Makefile.am
useless, but I did not test that.
A backspace inside if-endif does not work in makefiles.
Attached you will find an untested patch which uses a
different way of providing the library to be linked:
sqlite2.diff
-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
Hope that now is ok with head and that everything is on place.
Revertedin apps/tuxbox/enigma/src/Makefile.am will not work due
to missing backspace, which can not be added here either.
It might even render apps/tuxbox/enigma/src/Makefile.am
useless, but I did not test that.
A backspace inside if-endif does not work in makefiles.
Will try this, thank You very much.Attached you will find an untested patch which uses a
different way of providing the library to be linked
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
CVS HEAD should now work again, thanks for your fast response.
Yet another update for sqlite2.diff sqlite2.diff to bring Enigma to life.
Yet another update for sqlite2.diff sqlite2.diff to bring Enigma to life.
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
Patch looks good, it even works with uClibc.rhabarber1848 hat geschrieben:Yet another update for sqlite2.diff sqlite2.diff to bring Enigma to life.
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
That might certainly be the case, but as I do not have a dreambox I canfergy hat geschrieben:Umm, Dreambox branch is little different of head, must to remake this patch for it.
not help you with this, sorry. But I think willingness exists to merge HEAD
and dreambox branch some day, can you help us with this?
-
- Developer
- Beiträge: 93
- Registriert: Dienstag 13. September 2005, 15:30
Re: sql
Well, not too much different. It's old style schoolrhabarber1848 hat geschrieben:That might certainly be the case, but as I do not have a dreambox I canfergy hat geschrieben:Umm, Dreambox branch is little different of head, must to remake this patch for it.
not help you with this, sorry. But I think willingness exists to merge HEAD
and dreambox branch some day, can you help us with this?

Sure I can! Shout what You need!
-
- CDK-Experte
- Beiträge: 4335
- Registriert: Donnerstag 3. April 2008, 14:05
Re: sql
patch -p0 -E -i sqlite2.diff -Rfergy hat geschrieben:Is now complete?
applies cleanly now so I think everything was committed.
Please note that Enigma now has its own check for Sqlite
which is

--enable-sqlite:
Code: Alles auswählen
TUXBOX_APPS_LIB_PKGCONFIG(SQLITE,sqlite3)

directories outside the Tuxbox CDK, therefore circumventing
the Tuxbox CDK dependency management.