prepare() server internal error when using TTL

0

** <b>AWS Update:</b> Keyspaces now supports TTL: https://aws.amazon.com/blogs/database/announcing-amazon-keyspaces-time-to-live-ttl-general-availability/ **

I am seeing an internal error returrned from key space when I try to prepare the following statement.

		createAccessToken = getSession().prepare(  
				"INSERT INTO access_tokens" + "(atokenid, atoken, useruuid, auth, clientid, expiration, time, code, version)"  
						+ "VALUES (?,?,?,?,?, ?,?,?,?) IF NOT EXISTS USING TTL ?;");  

The issue appears to be with the USING TTL ? since the following prepare doesn't exhibit the issue.
createAccessToken = getSession().prepare(
"INSERT INTO access_tokens" + "(atokenid, useruuid, atoken, auth, clientid, code, expiration, time, version)"
+ "VALUES (?,?,?,?,?, ?,?,?,?) USING TTL 200;");
Anybody know of a work around that doesn't have me hard code the ttl?

Edited by: ArturoAtAWS on Oct 18, 2021 3:03 PM

gefragt vor 4 Jahren226 Aufrufe
3 Antworten
0

Seems the issue is moot since Keyspaces doesn't support ttl.

beantwortet vor 4 Jahren
0

Thanks for the question and info! Our roadmap is driven by customer feedback so it's super helpful to get more info on how you are using prepared statements with TTL.

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen