Skip to content

Can SQLPage customizations (e.g. handlebar templates) live in sqlpage_files table? #174

Closed Answered by lovasoa
shah asked this question in Q&A
Discussion options

You must be logged in to vote

Yes they can !

Example

Database structure

CREATE TABLE sqlpage_files(
  path VARCHAR(255) NOT NULL PRIMARY KEY,
  contents BLOB,
  last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

insert into sqlpage_files VALUES (
    'sqlpage/templates/my_component.handlebars',
    'Hello {{name}} !',
    now()
);

index.sql:

select 'my_component' as component, 'world' as name;

Result

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by shah
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested custom components Related to custom user-created handlebar components
2 participants