Giter Club home page Giter Club logo

Comments (5)

jmafc avatar jmafc commented on August 17, 2024

I'm not sure I follow exactly, but let me try. I assume you have two or more functions in your database and, I'm guessing, one of the function's source was output different than the other (and further, perhaps you prefer one style over the other). If that's the case, and IIRC that's a "feature" of the YAML output processor, i.e., it uses one style based on the length of the text or some other parameter. On one of my test databases, I see three "text styles":

 function ...:
   language: sql
   source: |-
      SELECT CASE WHEN ...
      ELSE ...
...
 function ...:
   language: plpgsql
   source: "\ndeclare ..."
...
  view ...:
    definition: |2-
      SELECT ( ...

In fact all of the views use the ": |2-" which IIRC means the indentation is two spaces. The SQL functions, which use ":|-" have no indentation (or arbitrary indentation. The PLPGSQL functions use a single string enclosed in double quotes, probably because they start with a newline character and it would be difficult for YAML (which in essence uses newlines to replace the "}," delimiters that you find in JSON) to parse something like the following:

  source: |-

     declare ...

from pyrseas.

jmafc avatar jmafc commented on August 17, 2024

@salamsp Unless you have some other comments, I believe my discussion above shows that the YAML multiline string output is not unstable, so I'd like to close this issue. Let me know.

from pyrseas.

salamsp avatar salamsp commented on August 17, 2024

from pyrseas.

jmafc avatar jmafc commented on August 17, 2024

Sorry to hear that. Stay well.

from pyrseas.

salamsp avatar salamsp commented on August 17, 2024

from pyrseas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.