Query for Database Classes

Introduction

The class ClrClass can be used to retrieve the classes in the database.

Getting All Classes

For example, if the goal is to get all the classes in the database, a query like this would be used in the Starcounter Administrator which is found at http://localhost:8181/#/databases/default/sql when Starcounter is running:
1
SELECT * FROM ClrClass
Copied!
This would give back all the classes, including the built-in ones.

Getting User-Created Classes

To get the user-created classes, use this query:
1
SELECT *
2
FROM ClrClass c
3
WHERE c.Updatable=true
4
AND c.UniqueIdentifier NOT LIKE 'Simplified%'
5
AND c.UniqueIdentifier NOT LIKE 'Concepts.Ring%'
6
AND c.UniqueIdentifier NOT LIKE 'Starcounter.%'
7
AND c.UniqueIdentifier NOT LIKE 'SocietyObjects%'
Copied!
For example, if the query is run after following the steps in part one of the tutorial, it should look like this: