Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

49 adding postgres as a supported consumer #50

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hashanwcreately
Copy link

@hashanwcreately hashanwcreately commented Sep 9, 2024

Add Postgres support to Siddi event tracking system

  • Integrate Postgres as a new event consumer
  • Add pgConfig.ts for Postgres connection configuration
  • Modify siddi.ts:
    • Add postgresClient property
    • Implement initPostgres method for connection setup
    • Update close method to handle Postgres connection
  • Update consumers.ts:
    • Add Postgres consumer with test, identify, and track methods
    • Implement robust connection testing for Postgres
  • Ensure backward compatibility with existing consumers
  • Add necessary type declarations for global Postgres client

This commit enables Siddi to store events and user data in a Postgres
database while maintaining support for existing event consumers.

Added import for pgConfig.
Added a postgresClient property to the Siddi class.
Added the initPostgres method to initialize the Postgres connection.
Called this.initPostgres() in the constructor.
Added the close method to properly close the Postgres connection.

These changes add Postgres support to the Siddi class while maintaining the original functionality and code structure. The new methods (initPostgres and close) are documented in the same style as the existing methods.
- Integrate Postgres as a new event consumer
- Add pgConfig.ts for Postgres connection configuration
- Modify siddi.ts:
  - Add postgresClient property
  - Implement initPostgres method for connection setup
  - Update close method to handle Postgres connection
- Update consumers.ts:
  - Add Postgres consumer with test, identify, and track methods
  - Implement robust connection testing for Postgres
- Ensure backward compatibility with existing consumers
- Add necessary type declarations for global Postgres client

This commit enables Siddi to store events and user data in a Postgres
database while maintaining support for existing event consumers.
@hashanwcreately hashanwcreately linked an issue Sep 9, 2024 that may be closed by this pull request
@hashanwcreately
Copy link
Author

@hashanwcreately hashanwcreately marked this pull request as draft September 11, 2024 07:59
@hashanwcreately
Copy link
Author

as per @Damith88
we will try a different approach.

Having the postgres db behind an internal endpoint and add this endpoint as the consumer. + security considerations.

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.

Adding Postgres as a supported consumer
2 participants