Re: r16543 - gnucash/branches/gda-dev/src - Make GDA backend (sqlite) the default if file: or no access method is

2007-09-25 Thread Phil Longstaff
Josh Sled wrote:

 This inverse quoting style is really hard to follow. :/

I think I accidentally sent the e-mail in html format and this is what 
thunderbird did to it.

Phil

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r16543 - gnucash/branches/gda-dev/src - Make GDA backend (sqlite) the default if file: or no access method is

2007-09-24 Thread Derek Atkins
Phil Longstaff [EMAIL PROTECTED] writes:

 Log:
 Make GDA backend (sqlite) the default if file: or no access method is
 supplied.  The XML backend is still available if the file is not an
 sqlite file or if xml: is the access method.

Have you verified that you can actually /enter/ an xml
access method in the UI?

Also, does it do file-type auto-detection?  E.g., if you File - Open
an existing XML file, what happens?

-derek
-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r16543 - gnucash/branches/gda-dev/src - Make GDA backend (sqlite) the default if file: or no access method is

2007-09-24 Thread Phil Longstaff

   Derek Atkins wrote:

Phil Longstaff [1][EMAIL PROTECTED] writes:



Log:
Make GDA backend (sqlite) the default if file: or no access method is
supplied.  The XML backend is still available if the file is not an
sqlite file or if xml: is the access method.


Have you verified that you can actually /enter/ an xml
access method in the UI?

Also, does it do file-type auto-detection?  E.g., if you File - Open
an existing XML file, what happens?

-derek


   The UI doesn't support xml: (or any access method) but it can be entered
   from the command line i.e. gnucash xml:...
   It does file-type auto-detection but there is also the wrinkle that .db is
   added for sqlite files.  So, if you want to open foo, first the gda/sqlite
   backend look to see if foo.db exists and is an sqlite file. If so, it is
   used.   If,  not,  it  then checks to see if foo exists.  If so, the
   gda/sqlite backend assumes that it is a different type of file and lets the
   xml backend have a go at it.  If foo doesn't exist, the gda/sqlite backend
   will create foo.db.
   BTW, what is the qsf backend?
   Phil

References

   1. mailto:[EMAIL PROTECTED]
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r16543 - gnucash/branches/gda-dev/src - Make GDA backend (sqlite) the default if file: or no access method is

2007-09-24 Thread Derek Atkins
Phil Longstaff [EMAIL PROTECTED] writes:

 The UI doesn't support xml: (or any access method) but it can be entered from
 the command line i.e. gnucash xml:...

Yeah, we should probably fix this..  Or add other File - Open
methods to let the user choose the specific version.

 It does file-type auto-detection but there is also the wrinkle that .db is
 added for sqlite files.  So, if you want to open foo, first the gda/sqlite
 backend look to see if foo.db exists and is an sqlite file. If so, it is
 used.  If, not, it then checks to see if foo exists.  If so, the gda/sqlite
 backend assumes that it is a different type of file and lets the xml backend
 have a go at it.  If foo doesn't exist, the gda/sqlite backend will create
 foo.db.

Is .db actually required?  Is there some way to test the file and
then choose which backend to use?

 BTW, what is the qsf backend?

 Phil

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r16543 - gnucash/branches/gda-dev/src - Make GDA backend (sqlite) the default if file: or no access method is

2007-09-24 Thread Phil Longstaff

   Derek Atkins wrote:

Phil Longstaff [1][EMAIL PROTECTED] writes:



The UI doesn't support xml: (or any access method) but it can be entered from
the command line i.e. gnucash xml:...


Yeah, we should probably fix this..  Or add other File - Open
methods to let the user choose the specific version.



   I have a modified version of src/gnome-utils/gnc-file.c which allows you to
   select xml:  The gtk_file_chooser returns either the selected uri (with
   [2]file:// in front) or the selected file (with full path).  In both of
   these  cases,  if  you  type  [3]xml:foo  as  a  file  name, you get
   /path/[4]xml:foo.  My version will remove the path (which can be obtained
   from  gtk_file_chooser)  and separates out xml: and puts it all back
   together as [5]xml:/path/foo which works.  This allows you to navigate to
   the  correct directory and type [6]xml:filename.  If you try to type
   [7]xml:/path/file, you get an error dialog from gtk_file_chooser because
   it   looks   for   a   directory  named  xml:  and  can't  find  it.
   [8]xml:subdir/file also doesn't work because gtk_file_chooser looks for a
   directory named [9]xml:subdir.
   In  any  case, our db/file chooser could get a bit hairy.  If you want
   postgres/mysql/other db, youwouldneedtospecify
   host/username/password/dbname.  GDA has a way of creating pre-specified db
   connections, so we would need to allow the user to select one of these.  For
   xml or sqlite, it's a simple file.

It does file-type auto-detection but there is also the wrinkle that .db is
added for sqlite files.  So, if you want to open foo, first the gda/sqlite
backend look to see if foo.db exists and is an sqlite file. If so, it is
used.  If, not, it then checks to see if foo exists.  If so, the gda/sqlite
backend assumes that it is a different type of file and lets the xml backend
have a go at it.  If foo doesn't exist, the gda/sqlite backend will create
foo.db.


Is .db actually required?  Is there some way to test the file and
then choose which backend to use?



   .db  is  added by the sqlite provider for libgda and can't be gotten
   around.  I use the fact that qof can have multiple backends which match the
   same access provider (in this case, file:) and will try them in order.
   The GDA backend gets first shot and then XML.  It has to be this order to
   make sqlite the default for file: files.
BTW, what is the qsf backend?  It seems to exist independent of the XML backend
 but also processes XML files.

   Phil

References

   1. mailto:[EMAIL PROTECTED]
   2. file://localhost/
   3. xml:foo
   4. xml:foo
   5. xml:/path/foo
   6. xml:filename
   7. xml:/path/file
   8. xml:subdir/file
   9. xml:subdir
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: r16543 - gnucash/branches/gda-dev/src - Make GDA backend (sqlite) the default if file: or no access method is

2007-09-24 Thread Josh Sled
Phil Longstaff [EMAIL PROTECTED] writes:
 Yeah, we should probably fix this..  Or add other File - Open
 methods to let the user choose the specific version.



I have a modified version of src/gnome-utils/gnc-file.c which allows you to
select xml:  The gtk_file_chooser returns either the selected uri (with

This inverse quoting style is really hard to follow. :/


 BTW, what is the qsf backend?  It seems to exist independent of the XML 
 backend
  but also processes XML files.

QSF is the QOF Serialization Format.  It's a datatype-focused,
domain-agnostic way to generically serialize a QOF object graph... going off
of memory, it's something like:

object
  guid./guid
  integer name=id1/integer
  string name=nameFoo/string
  boolean name=isTruefalse/boolean
  !-- ... --
/object

It's exactly the opposite of what makes XML useful, by focusing on
datatypes, instead of field labels and semantics.


There is some QSF export of business objects, and a disabled menu option to
QSF export the account tree + opening balances.  There is a disabled menu
option to QSF import said data, with some abstract/generic mapper that
never seemed to work — IIRC, it would crash randomly, and I think if it does
succeed it might corrupt the objects.

-- 
...jsled
http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]


pgpK3oWcDvjII.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel