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

Creating columns with a single value (static column) [DATACASS-812] #978

Closed
spring-projects-issues opened this issue Oct 8, 2020 · 2 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

lmcdasi opened DATACASS-812 and commented

In the DataStax driver manual, there is a possibility to create columns as static.

https://docs.datastax.com/en/dse/6.0/cql/cql/cql_using/refStaticCol.html

In the driver code, the DefaultAlterTable seems to support the addition of static columns through: columnsToAddStatic

I'm wondering if we can achieve the same with the framework & if not is it possible introduce this functionality ?

Thx


No further details from DATACASS-812

@spring-projects-issues
Copy link
Author

Mark Paluch commented

That sounds a neat enhancement. Feel free to submit a pull request. I assume it doesn't make so much sense to use static columns for entities, right?

@spring-projects-issues
Copy link
Author

lmcdasi commented

The way that our developers would like to use it in the entity is:

@Getter
@Column(aud_typ) // Static
private String audioType;

So I guess a @Column(..., static=true) or alike would be great.

When the table is created that should translate into the static be added into the create table:

 
CREATE TABLE test_media.media (
...
aud_channels int static,
aud_dtls map<text, text> static,
aud_smpl_rate int static,
aud_typ text static,
cr_time timestamp,
del_at timestamp,
dur_mls bigint static,
live boolean static,
media_typ text static,
parent boolean,
seg_end_mls bigint,
seg_start_mls bigint,
size_bytes bigint static,
stor_path text static,
PRIMARY KEY (....)
) WITH CLUSTERING ORDER BY (rlm_id ASC, seg_id ASC)
....;
 
Sorry - I'm playing a bit of a 3rd party on this request

@spring-projects-issues spring-projects-issues added the type: enhancement A general enhancement label Dec 31, 2020
azotcsit added a commit to azotcsit/spring-data-cassandra that referenced this issue Mar 28, 2021
azotcsit added a commit to azotcsit/spring-data-cassandra that referenced this issue Mar 29, 2021
azotcsit added a commit to azotcsit/spring-data-cassandra that referenced this issue Mar 29, 2021
@mp911de mp911de closed this as completed in da9fc8f Apr 7, 2021
mp911de added a commit that referenced this issue Apr 7, 2021
Add author tags. Reformat code. Add overrides for methods that were introduced in the meantime.

See #978.
Original pull request: #1108.
@mp911de mp911de added this to the 3.2 GA (2021.0.0) milestone Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants