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

pgfs.py: Configurable file and directory names #5

Open
erichanson opened this Issue Dec 24, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@erichanson
Contributor

erichanson commented Dec 24, 2015

Currently the mounted fs has the structure:

mnt/aquameta/{schema_name}/{table_name}/{pk_value}/{column_name}

We want to give the user the option to override the pk_value directory name and column_name file name with custom values, typically a human-readable identifier for the the row, and adding an extension to the column.

We want to potentially use data from other relations in the generated name.

pk_value override

create table row_name_generator (
  id uuid primary key,
  relation_id meta.relation_id,
  name_generator text -- SQL query (?)
)

Then in pgfuse.py, in the ls handler when at the row-list level, check for a row_name_generator row that matches this relation and if present, use the name_generator to generate its name.

column_name override

create table column_name_generator (
  id uuid primary key,
  column_id meta.column_id,
  name_generator text -- SQL query (?)
)

Then in pgfuse.py, in the ls handler when at the column level, check for a column_name_generator row that matches each column, and if present, use the name_generator to generate its name.

@erichanson erichanson changed the title from Configurable file and directory names to pgfuse.py: Configurable file and directory names Dec 24, 2015

@erichanson erichanson changed the title from pgfuse.py: Configurable file and directory names to pgfs.py: Configurable file and directory names Dec 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment