(self, fileName, encoding, single)
return retVal
Called by MySQL and PostgreSQL plugins to write a file on the
        back-end DBMS underlying file system
Called by MySQL and PostgreSQL plugins to write a file on the
        back-end DBMS underlying file system
Called by MySQL and PostgreSQL plugins to write a file on the back - end DBMS underlying file system
def fileEncode(self, fileName, encoding, single):
        """
        Called by MySQL and PostgreSQL plugins to write a file on the
        back-end DBMS underlying file system
        """

        retVal = []
        with open(fileName, "rb") as f:
            content = f.read().encode(encoding).replace("\n", "")

        if not single:
            if len(content) > 256:
                for i in xrange(0, len(content), 256):
                    _ = content[i:i + 256]

                    if encoding == "hex":
                        _ = "0x%s" % _
                    elif encoding == "base64":
                        _ = "'%s'" % _

                    retVal.append(_)

        if not retVal:
            if encoding == "hex":
                content = "0x%s" % content
            elif encoding == "base64":
                content = "'%s'" % content

            retVal = [content]

        return retVal
def fileEncode ( self , fileName , encoding , single ) : retVal = [ ] with open ( fileName , "rb" ) as f : content = f . read ( ) . encode ( encoding ) . replace ( "\n" , "" ) if not single : if len ( content ) > 256 : for i in xrange ( 0 , len ( content ) , 256 ) : _ = content [ i : i + 256 ] if encoding == "hex" : _ = "0x%s" % _ elif encoding == "base64" : _ = "'%s'" % _ retVal . append ( _ ) if not retVal : if encoding == "hex" : content = "0x%s" % content elif encoding == "base64" : content = "'%s'" % content retVal = [ content ] return retVal