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

Medoo Schema Option #1116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

WeslleyRAraujo
Copy link

@WeslleyRAraujo WeslleyRAraujo commented Mar 14, 2024

I found myself in a situation where I needed to use another schema, so i made this change to the tableQuote method and added $this->schema attribute for globally schema

a example of my use:

// in Medoo constructor i pass ['schema' => 'information_schema']
$medoo->select('columns', ['data_type'], ['table_name' => "{$this->table}"]);

// also you can use like this
// in Medoo constructor don't pass ['schema' => 'information_schema']
$medoo->select('information_schema.columns', ['data_type'], ['table_name' => "{$this->table}"]);

raw query (Postgresql)

SELECT "data_type" FROM information_schema."columns"
WHERE  "table_name" = $tableName;

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

Successfully merging this pull request may close these issues.

1 participant