Skip to content

Commit

Permalink
testing code for #125
Browse files Browse the repository at this point in the history
  • Loading branch information
janproch committed Jun 10, 2021
1 parent 643695b commit f5ea87d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/web/src/widgets/SqlObjectList.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<script lang="ts" context="module">
function generateObjectList(seed = 0) {
const counts = [1000, 1200, 1100, 2100, 720];
const schemas = ['A', 'dev', 'public', 'dbo'];
const types = ['tables', 'views', 'functions', 'procedures', 'matviews', 'triggers'];
const res = _.range(1, counts[seed % counts.length]).map(i => ({
pureName: `name ${i}`,
schemaName: schemas[i % schemas.length],
objectTypeField: types[i % types.length],
}));
return res;
}
</script>

<script lang="ts">
import InlineButton from '../elements/InlineButton.svelte';
import SearchInput from '../elements/SearchInput.svelte';
Expand Down Expand Up @@ -33,6 +47,10 @@
)
);
// let generateIndex = 0;
// setInterval(() => (generateIndex += 1), 2000);
// $: objectList = generateObjectList(generateIndex);
const handleRefreshDatabase = () => {
axiosInstance.post('database-connections/refresh', { conid, database });
};
Expand Down

0 comments on commit f5ea87d

Please sign in to comment.