Skip to content

Commit b3115f4

Browse files
committed
comments, and renames
1 parent e2b2966 commit b3115f4

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

source-modules/DebugUtils.module.pq

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,37 @@
1313
Buff = BufferAny,
1414
BuffTable = TableDelayedBuffer,
1515
Json = ToJson,
16+
xray = ToJson, XRAY = xray,
1617

18+
// meta of value
1719
Meta = (source as any) as record => Value.Metadata( source ),
20+
// type of value
1821
Tinfo = (source as any) as type => Value.Type( source ),
22+
// meta of typedata
1923
TinfoMeta = (source as any) as record => Value.Metadata( Value.Type( source ) ),
24+
// inspect type, meta, and typedata meta
2025
TinfoAll = (source as any) as record => [ // not optimized, redundant expression, but it's a debug tool
2126
Type = Tinfo( source ),
2227
Meta = Meta( source ),
2328
TypeMeta = TinfoMeta( source ),
2429
Source = source
2530
],
2631

27-
xray = ToJson, XRAY = xray,
28-
32+
// always case-insensitive
2933
Text.Contains.CI = ( source as nullable text, substring as text) as nullable logical =>
3034
Text.Contains( source, substring, Comparer.OrdinalIgnoreCase ),
3135

32-
// mainly for interactive use when debugging
36+
// always case-insensitive
3337
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 ),
3539

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),
3842

3943
// IIRC this only affects evaluation when using the query editor. so if you have a lot of sketches, this may help there. YMMV
4044
TableDelayedBuffer = (source as table) as table =>
4145
Table.Buffer(source, [ BufferMode = BufferMode.Delayed ] ),
4246

43-
StopFold = (source as table) as table => Table.StopFolding(source),
44-
4547
// auto buffer by type
4648
BufferAny = (source as any) as any =>
4749
if source is table then Table.Buffer(source, [ BufferMode = BufferMode.Delayed ])
@@ -53,6 +55,7 @@
5355
Detail = source
5456
],
5557

58+
// renders object as jsonified text, with some formatting
5659
ToJson = (source as any, optional options as nullable record ) as text => [
5760
defaults = [
5861
Encoding = TextEncoding.Utf8,

0 commit comments

Comments
 (0)