summaryrefslogtreecommitdiffstats
path: root/kexi/doc/dev/kexi_import.txt
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/doc/dev/kexi_import.txt')
-rw-r--r--kexi/doc/dev/kexi_import.txt61
1 files changed, 61 insertions, 0 deletions
diff --git a/kexi/doc/dev/kexi_import.txt b/kexi/doc/dev/kexi_import.txt
new file mode 100644
index 00000000..be640ba1
--- /dev/null
+++ b/kexi/doc/dev/kexi_import.txt
@@ -0,0 +1,61 @@
+kexiImport proposal - piggz (www.piggz.co.uk)
+=============================================
+
+This is a proposal for some import functionality for kexi.
+As of this moment i have no idea how it will work, but ive
+been thinking and figured i should get something down in
+writing. Hopefully you will all improve on this and we can
+get something working.
+
+The way i see it we need to do a few things:
+
+1) A common api to different import systems
+ This would be similar in concept to kexidb drivers, but would
+ only provide limited, specific functionality
+
+2) DB specific classes that provide import functionality
+ for postgres, mysql firebird etc...
+
+
+For 1) we need to to:
+
+i) Connect to backend -|
+ |
+ii) Get list of databases | All this is already catered for in
+ | kexidb
+iii) Get list of tables -|
+
+iv) For a given table, get list of columns as stringlist
+
+v) For a given table/column combination, get extended information for
+ that column:
+
+ type
+ +--If a known kexi type then ok
+ +--If unknown then driver may be able to automagically map to suitable type
+ +--Ask the user what to do (map to type, convert column, drop column)
+
+ index (yes/no)
+
+ pkex (yes/no)
+
+ default value
+
+ Alot of this is already catered for in old kexi api, so maybe some
+ chunks fo code could be reused, though a bit of a rewrite is inevitable
+ to limit the functionality to the above
+
+Once the table/column information is available then a tableschema object would be
+created and standard kexidb api could create nescessary structure. For this there
+would be 2 modes of operation
+
+A) Structure will be created under new db name, and kexidb api would be used as
+ normal
+
+B) Structure will be created in existing db. Kexi api would need a mode where
+ kexi__* structure is created, but tables are not created as they already exist
+
+
+Ideas, suggestions and designs welcome :o)
+
+PiggZ \ No newline at end of file