Skip to content

How to use jet in multi tenant systems

go-jet edited this page May 20, 2021 · 3 revisions
	multiTenant1 :=SELECT(Artist.AllColumns).
		FROM(Artists)                    // default schema/database "chinook"
		ORDER_BY(Artist.ArtistId).
		LIMIT(10)

        Artist2 := Artist.FromSchema("chinook2") // the same generated SQL builder type used for different schema/database

	multiTenant2 := 
		SELECT(Artist2.AllColumns).
		FROM(Artist2).
		ORDER_BY(Artist2.ArtistId).
		LIMIT(10)