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

Support creating time series collections #2533

Open
nicklaw5 opened this issue May 19, 2023 · 4 comments
Open

Support creating time series collections #2533

nicklaw5 opened this issue May 19, 2023 · 4 comments
Labels

Comments

@nicklaw5
Copy link

nicklaw5 commented May 19, 2023

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

As far as I can tell, this ODM doesn't yet support creating time series collections.

It doesn't appear to me that it would be too difficult to implement this. Seems we'd need to add the timeseries option on Document::$collection like we already do for the capped, size and max collection options.

The end goal for my team and I would be to have the ability to create time series collections using the DoctrineMongoDBBundle schema:create command:

bin/console doctrine:mongodb:schema:create --collection
@malarzm
Copy link
Member

malarzm commented May 19, 2023

Seems we'd need to add the timeseries option on Document::$collection like we already do for the capped, size and max collection options.

That'd be the way to go IMO. Possible it'll turn out that instead of array-based configs it'll be better to have dedicated CappedCollection and TimeSeriesCollection VOs :)

It doesn't appear to me that it would be too difficult to implement this.

Are you willing to give it a go?

cyildirim added a commit to cyildirim/mongodb-odm that referenced this issue Jul 3, 2023
cyildirim added a commit to cyildirim/mongodb-odm that referenced this issue Jul 3, 2023
AnnotationDriver class is set as timeseries so that we avoid validator for timeseries. Timeseries doctrine#2533
cyildirim added a commit to cyildirim/mongodb-odm that referenced this issue Jul 3, 2023
Create collection time series support doctrine#2533
@bradroc
Copy link

bradroc commented Sep 7, 2023

Are you willing to give it a go?

I'd be willing to make a stab at this @malarzm. Is there any preference on direction re: using the same Collection definition or having a separate decorator for TimeSeriesCollection?

@malarzm
Copy link
Member

malarzm commented Sep 7, 2023

I'd be willing to make a stab at this @malarzm.

Awesome! Thank you 🎉

FWIW there's work started in a draft PR here: #2542

Is there any preference on direction re: using the same Collection definition or having a separate decorator for TimeSeriesCollection?

For now we've decided to follow in the footsteps of capped collection as it made sense, however I really like the idea of having #[Collection], #[CappedCollection] and #[TimeSeriesCollection]! That would clearly separate what setting goes where. If I'm not mistaken this can be done as a separate step though, so:

  1. Finish Dev timeseries #2542 or open new one
  2. Have it merged
  3. Introduce new attributes/xml syntax in a BC manner, deprecate old properties

@cyildirim
Copy link

HI @bradroc, it would be great to collaborate on this. We need to rerun/fix/add some tests on the project. I've shared some progress on Symfony's new-doctrine-contributors slack channel. If you can join us there it would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants