Giter Site home page Giter Site logo

marcgreenstock / data-api-suite Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 11.0 2 MB

Monorepo that includes libraries, Serverless Framework plugins and development tools to simplify and enhance the development, deployment and use of the Data API for Aurora Serverless.

License: MIT License

JavaScript 0.43% TypeScript 99.57%
aurora serverless data-api posgresql offline local

data-api-suite's People

Contributors

dependabot[bot] avatar intmainvoid avatar marcgreenstock avatar merlinorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

data-api-suite's Issues

Data API local fails if a table has a dropped column

The query to pull schema information from Postgres fails if a table has a dropped column:

2020-12-03 11:06:06.539 EST [20366] ERROR:  column "........pg.dropped.2........" of relation "xyz" does not exist
2020-12-03 11:06:06.539 EST [20366] STATEMENT:
                SELECT
                  c.oid AS "tableID",
                  a.attnum AS "columnID",
                  c.relname AS "tableName",
                  CASE a.attnotnull
                    WHEN true THEN 0
                    WHEN false then 1
                  END AS "nullable",
                  CASE
                    WHEN pg_get_serial_sequence(n.nspname||'.'||c.relname, a.attname) IS NULL
                    THEN false
                    ELSE true
                  END AS "isAutoIncrement"
                  FROM pg_class c
                  JOIN pg_namespace n ON n.oid = c.relnamespace
                  JOIN pg_attribute a ON attrelid = c.oid
                  WHERE c.oid = ANY($1::oid[])
                  ORDER BY a.attnum ASC

Bug in FormatISO9075

There is a bug in formatISO9075 in retrieving the date. It retrieves the day of the week instead. See this fix:


export const formatISO9075 = (date: Date): string => {
    const y = date.getUTCFullYear().toString()
    const m = (date.getUTCMonth() + 1).toString().padStart(2, '0')
    const d = date.getUTCDate().toString().padStart(2, '0')
    const h = date.getUTCHours().toString().padStart(2, '0')
    const min = date.getUTCMinutes().toString().padStart(2, '0')
    const sec = date.getUTCSeconds().toString().padStart(2, '0')
    const ms = date.getUTCMilliseconds().toString()
    return `${y}-${m}-${d} ${h}:${min}:${sec}.${ms}`
}```

Migrations table name

Hi! First of all, thanks for sharing this suite of tools.

Would you be open to allowing the table name used for storing migrations to be customised? This would be useful if you're using Postgres schemas, so that __migrations__ becomes schema1.__migrations__, for example.

Also, when do you typically run migrations? Do you have any experience with automatically running migrations after the function is deployed?

Thanks again!

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.