Questions tagged [unique-key]
A key is a set of attributes that is irreducibly unique and non-nullable within a table.
unique-key
520
questions
0
votes
0
answers
44
views
How to generate unique value for each job in PowerShell GitHub strategy matrix
Below is a sample github workflow in powershell (part of the code not shared) where i need unique values for psuffix attribute.
on:
workflow_call:
inputs:
repo:
...
1
vote
0
answers
60
views
uniqueKey.toString() generating "Instance of 'UniqueKey'" instead of a unique key on IOS
My flutter data model uses UniqueKey to generate unique keys for firebase documents:
final String uKey = UniqueKey().toString();
DocumentReference documentReferencer =
_mainCollection.doc(...
0
votes
1
answer
39
views
Defining a unique key on a PostGIS table
I'm looking for advice on how best to manage the following problem with a PostGIS table.
A query produces a table of geographic sectors (polygons) from several other reference tables such as ...
-1
votes
1
answer
736
views
Warning: Encountered two children with the same key, ``
I am using ReactJS, NextJS 14, Tailwind CSS and Framer Motion.
I have to put unique keys for each repeated child in React, so I do have to in NextJS. That is also why I put the index value to the ...
-1
votes
1
answer
134
views
mongoose index needs to be unique, not required to take a null or '' value
a user is supposed to be able to create a booking and choose the way the company will contact them - email or phone or whatsapp, I do not want anyone spamming with bookings so these are unique values, ...
0
votes
0
answers
140
views
React Native - why does uuid return "TypeError: undefined is not a function, js engine: hermes"?
I am working on a React Native project where I need to generate unique keys, so uuid was a good choice. But after a couple of tries, I receive the error message "TypeError: undefined is not a ...
0
votes
0
answers
36
views
MySQL insert values only if non exists in unique key combination
in one of my tables, there is a unique key based on two columns. One must be a value (NOT NULL) and the other may be NULL.
For the logic behind the issue, I made this table schema;
CREATE TABLE `...
1
vote
1
answer
37
views
Duplicate key name on property of a table being created on MariaDB
I just want to create a new table on my database, but doing so:
CREATE TABLE `houses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`room_id` int(11) NOT NULL,
`car_id` int(11)...
-1
votes
2
answers
50
views
How do you get a double-column unique key as foreign key?
I have the following two tables in MariaDB 11.0.2:
CREATE TABLE `Languages` (
`Name` char(49) DEFAULT NULL,
`ISO_639_1` char(2) NOT NULL,
`Language_ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
...
0
votes
1
answer
28
views
How to get unique and returning users count from overall user enteries with a user key in couchDB
I have a key called 'username' that stores the user logic records with a unique user id in couchDB. Now I want to get unique users count and returning users count from those records with the help of ...
2
votes
0
answers
29
views
Unable to print unique items based on variant_id in jinja template
I am trying to print the unique items based on their variant ids. Only unique items are to be printed.
{% set unique_items = [] %}
{% for item in items %}
{% if item.variant_id not in unique_items ...
1
vote
1
answer
310
views
Reactjs Two children with the same key react
when am trying to Profile info of another user it shows duplicate with this error
"Warning: Encountered two children with the same key, the id of user here. Keys should be unique so that ...
0
votes
0
answers
109
views
@OneToOne mapping with unique=true throws "caused a duplicate key value in a unique or primary key constraint'
The following mapping works fine in Hibernate 3.x.
@OneToOne(fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, optional = true)
@JoinColumn(name = "PAYLOAD_FILTER", unique = true)
...
2
votes
1
answer
670
views
Foreign key referencing unique composite key or single primary key
I am creating a database for an app that helps learn a language. I need to create tests that vary by section (test for grammar, about text, etc), topic and level.
USER
id (pk, autoincrement)
name
...
0
votes
2
answers
2k
views
How to generate 10 digit unique-id in python?
I want to generate 10 digit unique-id in python. I have tried below methods but no-one worked
get_random_string(10) -> It generate random string which has probability of collision
str(uuid.uuid4())...