Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vlatest #9

Merged
merged 9 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.6.0] - 2024-09-19

### Changed

- Name change to `bx-compat-cfml` to better describe the module
Expand Down Expand Up @@ -66,7 +68,9 @@ transpiler = {

- First iteration of this module

[Unreleased]: https://github.com/ortus-boxlang/bx-compat-cfml/compare/v1.4.1...HEAD
[Unreleased]: https://github.com/ortus-boxlang/bx-compat-cfml/compare/v1.6.0...HEAD

[1.6.0]: https://github.com/ortus-boxlang/bx-compat-cfml/compare/v1.4.1...v1.6.0

[1.4.1]: https://github.com/ortus-boxlang/bx-compat-cfml/compare/v1.4.0...v1.4.1

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Thu Sep 19 13:43:38 UTC 2024
#Thu Sep 19 15:03:48 UTC 2024
boxlangVersion=1.0.0-snapshot
jdkVersion=21
version=1.6.0
version=1.7.0
group=ortus.boxlang
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
*/
package ortus.boxlang.modules.compat.bifs.system;

import java.util.Map;

import ortus.boxlang.runtime.bifs.BIF;
import ortus.boxlang.runtime.bifs.BoxBIF;
import ortus.boxlang.runtime.context.IBoxContext;
Expand All @@ -22,6 +24,10 @@
import ortus.boxlang.runtime.scopes.Key;
import ortus.boxlang.runtime.types.Argument;
import ortus.boxlang.runtime.types.Function;
import ortus.boxlang.runtime.types.Query;
import ortus.boxlang.runtime.types.QueryColumn;
import ortus.boxlang.runtime.types.Array;
import ortus.boxlang.runtime.types.Struct;

@BoxBIF
public class GetMetaData extends BIF {
Expand Down Expand Up @@ -58,6 +64,18 @@ public Object _invoke( IBoxContext context, ArgumentsScope arguments ) {
return boxClass.getMetaData();
}

if ( value instanceof Query query ) {
Array columnMetadata = new Array();
for ( Map.Entry<Key, QueryColumn> entry : query.getColumns().entrySet() ) {
columnMetadata.add( Struct.of(
Key._name, entry.getKey(),
Key.typename, entry.getValue().getType().toString(),
Key.of( "isCaseSensitive" ), false
) );
}
return columnMetadata;
}

// All other types return the class of the value to match CF engines
return value.getClass();
}
Expand Down
Loading