Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Assigning unique ID's to a record #68

Open
joemottershaw opened this issue Apr 3, 2020 · 3 comments
Open

Assigning unique ID's to a record #68

joemottershaw opened this issue Apr 3, 2020 · 3 comments
Labels

Comments

@joemottershaw
Copy link

joemottershaw commented Apr 3, 2020

Don't know if I'm just missing something here, but in the readme, you mention:

// my user id
$userId = '92832711';

// get the user information by id
$item = $db->get($userId);

How would you actually go about creating that ID in a real world example? When you call$database->get('92832711'), is there some sort of auto incrementing ID stored somewhere in a separate record that you reference every time or is this up to us to generate ourselves?

I've written some wrappers and helper functions in my project for now that do this for me, but just wanted to know if there was a simpler way of having each record in a database directory unique like in a standard database.

Or are you using generating a UUID for each entry?

@timothymarois
Copy link
Member

@joemottershaw Currently you have to come up with your own ID, Filebase just stores the data. That is a good feature for the future though for auto-incrementing if we had that setting in place.

@tsmgeek
Copy link

tsmgeek commented Apr 13, 2020

#60

There is a WIP on this idea.

@timothymarois
Copy link
Member

@tsmgeek Good find there, I believe it originally had conflicts, but I'll look that over and see if it can be merged in.

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

No branches or pull requests

3 participants