Diff for /ZSQLExtend/ZSQLExtend.py between versions 1.124 and 1.126

version 1.124, 2008/02/15 13:05:41 version 1.126, 2008/03/31 13:31:34
Line 127  class ZSQLExtendFolder(Folder,Persistent Line 127  class ZSQLExtendFolder(Folder,Persistent
         """quote str for sql"""          """quote str for sql"""
         return sql_quote(str)          return sql_quote(str)
           
       def unicodify(self, s):
           """return unicode object for string (utf-8 or latin1) or unicode object s"""
           return unicodify(s)
       
       def utf8ify(self, s):
           """return utf-8 encoded string object for string or unicode object s"""
           return utf8ify(s)
   
           
     def normalizeField(self,table,fieldname, newFieldName=None,mode="alter", RESPONSE=None):      def normalizeField(self,table,fieldname, newFieldName=None,mode="alter", RESPONSE=None):
         """normalize a field, d.h. entfernt alle diakritischen Zeichen und ersetzt diese           """normalize a field, d.h. entfernt alle diakritischen Zeichen und ersetzt diese 
Line 357  class ZSQLExtendFolder(Folder,Persistent Line 365  class ZSQLExtendFolder(Folder,Persistent
         return ret          return ret
                   
           
     def importXMLFileFMP(self,tables,dsn=None,uploadfile=None,update_fields=None,id_field=None,sync_mode=False,      def importXMLFileFMP(self,table,dsn=None,uploadfile=None,update_fields=None,id_field=None,sync_mode=False,
                          lc_names=True,keep_fields=False,ascii_db=False,replace=False,backup=False,                           lc_names=True,keep_fields=False,ascii_db=False,replace=False,backup=False,
                          debug=False,log_to_response=False,                           debug=False,log_to_response=False,
                          redirect_url=None,RESPONSE=None):                           redirect_url=None,RESPONSE=None):
         '''          '''
         Import FileMaker XML file (FMPXMLRESULT format) into the table.          Import FileMaker XML file (FMPXMLRESULT format) into the table.
         @param dsn: database connection string          @param dsn: database connection string
         @param table: name of the table the xml shall be imported into          @param table: name of the table the xml shall be imported into (may be comma-separated list)
         @param uploadfile: xmlfile file          @param uploadfile: xmlfile file
         @param update_fields: (optional) list of fields to update; default is to create all fields          @param update_fields: (optional) list of fields to update; default is to create all fields
         @param id_field: (optional) field which uniquely identifies an entry for updating purposes.          @param id_field: (optional) field which uniquely identifies an entry for updating purposes.
Line 390  class ZSQLExtendFolder(Folder,Persistent Line 398  class ZSQLExtendFolder(Folder,Persistent
         if not dsn:          if not dsn:
             dsn=self.getConnectionObj().connection_string              dsn=self.getConnectionObj().connection_string
                   
         tablelist=tables.split(',')          tablelist=table.split(',')
         logging.debug("tablelist: %s" %tablelist)          logging.debug("tablelist: %s" %tablelist)
         #table=tables          #table=tables
                   
         for table in tablelist :             for t in tablelist :   
             logging.debug("table: %s" %table)                logging.debug("table: %s" %table)  
             options=Options()              options=Options()
             options.dsn=dsn              options.dsn=dsn
             options.table=table              options.table=t
             options.filename=filename              options.filename=filename
             options.update_fields=update_fields              options.update_fields=update_fields
             options.id_field=id_field              options.id_field=id_field

Removed from v.1.124  
changed lines
  Added in v.1.126


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>