mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 18:20:20 -06:00
31 lines
567 B
JavaScript
31 lines
567 B
JavaScript
/////////////////////////////////////////////////////////////
|
|
//
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
//
|
|
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
|
|
// This software is released under the PostgreSQL Licence
|
|
//
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
export class FakeModel {
|
|
constructor() {
|
|
this.values = {};
|
|
}
|
|
|
|
set(key, value) {
|
|
this.values[key] = value;
|
|
}
|
|
|
|
get(key) {
|
|
return this.values[key];
|
|
}
|
|
|
|
unset(key) {
|
|
delete this.values[key];
|
|
}
|
|
|
|
toJSON() {
|
|
return Object.assign({}, this.values);
|
|
}
|
|
}
|