Skip to content

Conversation

@meierj-wayscript
Copy link
Contributor

@meierj-wayscript meierj-wayscript commented Aug 17, 2021

Change description

Support executing sql against a database.

Example:

from wayscript.integrations.sql import postgres

_id = "c227ed10-1174-4722-a25a-1e5d3f770ad2"
conn = postgres.get_client_for_workspace_integration(_id)

with conn.cursor() as cursor:
    cursor.execute("SELECT *  FROM public.event;")
    print(len([x for x in cursor]))

Checklist

  • Application changes have been tested and automated tests have been added, if applicable
  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Related issues

Fixes #xxxx

Copy link
Contributor

@jdhayford jdhayford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌🏼

@meierj-wayscript meierj-wayscript merged commit 5c2cd50 into wayscript:master Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants