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

make key_value.lix_server_url always defined #221

Open
samuelstroschein opened this issue Dec 17, 2024 — with Linear · 0 comments
Open

make key_value.lix_server_url always defined #221

samuelstroschein opened this issue Dec 17, 2024 — with Linear · 0 comments

Comments

Copy link
Member

Context

Ran into a bug because i was updating lix_server_url instead of insert on conflict update

await Promise.all(
		[lixA, lixB].map((lix) =>
			lix.db
				.updateTable("key_value")
				.where("key", "=", "lix_server_url")
				.set({ value: "http://mock.com" })
				.execute(),
		),
	);

Proposal

Make lix_server_url always defined as JSON where either a URL is given or the value is null.

  • avoid insert, on conflict logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant