|
13 | 13 | Buff = BufferAny, |
14 | 14 | BuffTable = TableDelayedBuffer, |
15 | 15 | Json = ToJson, |
| 16 | + xray = ToJson, XRAY = xray, |
16 | 17 |
|
| 18 | + // meta of value |
17 | 19 | Meta = (source as any) as record => Value.Metadata( source ), |
| 20 | + // type of value |
18 | 21 | Tinfo = (source as any) as type => Value.Type( source ), |
| 22 | + // meta of typedata |
19 | 23 | TinfoMeta = (source as any) as record => Value.Metadata( Value.Type( source ) ), |
| 24 | + // inspect type, meta, and typedata meta |
20 | 25 | TinfoAll = (source as any) as record => [ // not optimized, redundant expression, but it's a debug tool |
21 | 26 | Type = Tinfo( source ), |
22 | 27 | Meta = Meta( source ), |
23 | 28 | TypeMeta = TinfoMeta( source ), |
24 | 29 | Source = source |
25 | 30 | ], |
26 | 31 |
|
27 | | - xray = ToJson, XRAY = xray, |
28 | | - |
| 32 | + // always case-insensitive |
29 | 33 | Text.Contains.CI = ( source as nullable text, substring as text) as nullable logical => |
30 | 34 | Text.Contains( source, substring, Comparer.OrdinalIgnoreCase ), |
31 | 35 |
|
32 | | - // mainly for interactive use when debugging |
| 36 | + // always case-insensitive |
33 | 37 | Text.EndsWith.CI = (source as nullable text, substring as text) as nullable logical => |
34 | | - Text.EndsWith( source, substring, Comparer.OrdinalIgnoreCase ) |
| 38 | + Text.EndsWith( source, substring, Comparer.OrdinalIgnoreCase ), |
35 | 39 |
|
36 | | - StopFold = (source as table) as table => |
37 | | - Table.StopFolding(source), |
| 40 | + // stop folding without forcing buffer or index column enumerations |
| 41 | + StopFold = (source as table) as table => Table.StopFolding(source), |
38 | 42 |
|
39 | 43 | // IIRC this only affects evaluation when using the query editor. so if you have a lot of sketches, this may help there. YMMV |
40 | 44 | TableDelayedBuffer = (source as table) as table => |
41 | 45 | Table.Buffer(source, [ BufferMode = BufferMode.Delayed ] ), |
42 | 46 |
|
43 | | - StopFold = (source as table) as table => Table.StopFolding(source), |
44 | | - |
45 | 47 | // auto buffer by type |
46 | 48 | BufferAny = (source as any) as any => |
47 | 49 | if source is table then Table.Buffer(source, [ BufferMode = BufferMode.Delayed ]) |
|
53 | 55 | Detail = source |
54 | 56 | ], |
55 | 57 |
|
| 58 | + // renders object as jsonified text, with some formatting |
56 | 59 | ToJson = (source as any, optional options as nullable record ) as text => [ |
57 | 60 | defaults = [ |
58 | 61 | Encoding = TextEncoding.Utf8, |
|
0 commit comments