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

SleekDB Extension of builtin "named functions" by users #238

Open
REDAL opened this issue Jul 12, 2022 · 0 comments
Open

SleekDB Extension of builtin "named functions" by users #238

REDAL opened this issue Jul 12, 2022 · 0 comments

Comments

@REDAL
Copy link

REDAL commented Jul 12, 2022

Hi SleekDB Community,
what do you think of, applying given functions on selected columns,
for example, I need to use hash sha256 on '_id'

could/should be available for "select", "insert" etc.

container->createQueryBuilder()->select(["hashed_id" => hash("sha256", "_id"), "username"])->getQuery()->fetch();

rather than, saving a new column with hashed data, or remapping the array, when returned and adding the hashed values

of course, the idea is to apply, any given declared and existing function within your code, and it's not only for hash, your imagination is the limit

for example, tell sleekdb to hash the column on creating,
or search a column with hash content,

like,
->where(hash("sha256", "userid"), "=", "hash")

WHERE "userid" is a column within the database

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

2 participants