parameters: (self, fileName, encoding, single)
return_statement: return retVal
docstring: Called by MySQL and PostgreSQL plugins to write a file on the
          back-end DBMS underlying file system
docstring_summary: Called by MySQL and PostgreSQL plugins to write a file on the
          back-end DBMS underlying file system
docstring_tokens: Called by MySQL and PostgreSQL plugins to write a file on the back - end DBMS underlying file system
function: 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
function_tokens: 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