8 my $schema = DBICTest->init_schema( no_connect => 1, no_deploy => 1 );
10 is_deeply($schema->source_tree, {
11 " ( SELECT a.*, cd.cdid AS cdid, cd.title AS title, cd.year AS year\n FROM artist a\n JOIN cd ON cd.artist = a.artistid\n WHERE cd.year = ?)\n" => {},
13 artist_undirected_map => {
16 artwork_to_artist => {
46 collection_object => {
60 fourkeys_to_twokeys => {
106 timestamp_primary_key_test => {},
117 twokeytreelike => {},
119 }, 'got correct source tree');
121 is_deeply($schema->source_tree({ limit_sources => ['TwoKeys'] }), {
122 " ( SELECT a.*, cd.cdid AS cdid, cd.title AS title, cd.year AS year\n FROM artist a\n JOIN cd ON cd.artist = a.artistid\n WHERE cd.year = ?)\n" => {},
124 artist_undirected_map => {
127 artwork_to_artist => {
157 collection_object => {
171 fourkeys_to_twokeys => {
212 timestamp_primary_key_test => {},
217 twokeytreelike => {},
219 }, 'got correct source tree with limit_sources => [ ... ]');
221 is_deeply($schema->source_tree({ limit_sources => { TwoKeys => 1 } }), {
222 " ( SELECT a.*, cd.cdid AS cdid, cd.title AS title, cd.year AS year\n FROM artist a\n JOIN cd ON cd.artist = a.artistid\n WHERE cd.year = ?)\n" => {},
224 artist_undirected_map => {
227 artwork_to_artist => {
257 collection_object => {
271 fourkeys_to_twokeys => {
312 timestamp_primary_key_test => {},
317 twokeytreelike => {},
319 }, 'got correct source tree with limit_sources => { ... }');
321 # We probably also want a "collapsed" tree