kysely-codegen
Version:
`kysely-codegen` generates Kysely type definitions from your database. That's it.
19 lines • 592 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableMatcher = void 0;
const micromatch_1 = require("micromatch");
const OPTIONS = {
nocase: true,
};
class TableMatcher {
constructor(pattern) {
this.isMatch = (0, micromatch_1.matcher)(pattern, OPTIONS);
this.isSimpleGlob = !pattern.includes('.');
}
match(schema, name) {
const string = this.isSimpleGlob ? name : `${schema ?? '*'}.${name}`;
return this.isMatch(string);
}
}
exports.TableMatcher = TableMatcher;
//# sourceMappingURL=table-matcher.js.map
;